@anteros/core 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/api.ts +5 -0
- package/types/config.d.ts +1 -0
package/package.json
CHANGED
package/server/api.ts
CHANGED
|
@@ -391,6 +391,7 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
391
391
|
return c.json(response);
|
|
392
392
|
|
|
393
393
|
} catch (err: any) {
|
|
394
|
+
if (cfg?.debug) console.error(err)
|
|
394
395
|
return errorResponse(c, err);
|
|
395
396
|
}
|
|
396
397
|
});
|
|
@@ -443,6 +444,7 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
443
444
|
throw err;
|
|
444
445
|
}
|
|
445
446
|
} catch (err: any) {
|
|
447
|
+
if (cfg?.debug) console.error(err)
|
|
446
448
|
return errorResponse(c, err);
|
|
447
449
|
}
|
|
448
450
|
});
|
|
@@ -483,6 +485,7 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
483
485
|
const result = await handleUpload({ collection, tenant_id, file: fileField, data });
|
|
484
486
|
return c.json(result);
|
|
485
487
|
} catch (err: any) {
|
|
488
|
+
if (cfg?.debug) console.error(err)
|
|
486
489
|
return errorResponse(c, err);
|
|
487
490
|
}
|
|
488
491
|
});
|
|
@@ -528,6 +531,7 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
528
531
|
c.header('Cache-Control', 'public, max-age=31536000, immutable');
|
|
529
532
|
return c.newResponse(result.stream);
|
|
530
533
|
} catch (err: any) {
|
|
534
|
+
if (cfg?.debug) console.error(err)
|
|
531
535
|
return errorResponse(c, err);
|
|
532
536
|
}
|
|
533
537
|
});
|
|
@@ -555,6 +559,7 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
555
559
|
await handleDelete(tenant_id, collection, fileId);
|
|
556
560
|
return c.json({ message: 'File deleted', ok: true });
|
|
557
561
|
} catch (err: any) {
|
|
562
|
+
if (cfg?.debug) console.error(err)
|
|
558
563
|
return errorResponse(c, err);
|
|
559
564
|
}
|
|
560
565
|
});
|
package/types/config.d.ts
CHANGED