@dnax/core 0.43.0 → 0.45.0
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/app/hono.ts +3 -3
- package/lib/bento/index.ts +2 -1
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -410,7 +410,7 @@ function HonoInstance(): typeof app {
|
|
|
410
410
|
if (action == "upload") {
|
|
411
411
|
if (!parseBody?.file) return fn.error("File not found", 404);
|
|
412
412
|
if (col?.slug && col?.media?.enabled) {
|
|
413
|
-
let data = JSON.parse(parseBody?.data) ||
|
|
413
|
+
let data = JSON.parse(parseBody?.data) || [];
|
|
414
414
|
// rest.startTransaction();
|
|
415
415
|
|
|
416
416
|
let files = [];
|
|
@@ -423,7 +423,7 @@ function HonoInstance(): typeof app {
|
|
|
423
423
|
if (col?.hooks?.beforeUpload) {
|
|
424
424
|
await col?.hooks?.beforeUpload({
|
|
425
425
|
io: Cfg.io,
|
|
426
|
-
data: data,
|
|
426
|
+
data: Array?.isArray(data) ? data : [data],
|
|
427
427
|
c: c,
|
|
428
428
|
rest: rest,
|
|
429
429
|
action: "upload",
|
|
@@ -461,7 +461,7 @@ function HonoInstance(): typeof app {
|
|
|
461
461
|
if (col?.hooks?.afterUpload) {
|
|
462
462
|
await col?.hooks?.afterUpload({
|
|
463
463
|
io: Cfg.io,
|
|
464
|
-
data: data,
|
|
464
|
+
data: Array?.isArray(data) ? data : [data],
|
|
465
465
|
c: c,
|
|
466
466
|
rest: rest,
|
|
467
467
|
action: "upload",
|
package/lib/bento/index.ts
CHANGED