@dnax/core 0.30.4 → 0.30.6
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 +15 -3
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -416,12 +416,22 @@ function HonoInstance(): typeof app {
|
|
|
416
416
|
|
|
417
417
|
if (Array.isArray(parseBody?.file)) {
|
|
418
418
|
let insertedFiles = [];
|
|
419
|
-
|
|
419
|
+
|
|
420
|
+
let indexedData = 0;
|
|
421
|
+
let allFiles = parseBody?.file;
|
|
422
|
+
for await (let file of allFiles) {
|
|
423
|
+
let d;
|
|
424
|
+
if (Array.isArray(data) && data.length) {
|
|
425
|
+
d = data[indexedData];
|
|
426
|
+
} else {
|
|
427
|
+
d = data;
|
|
428
|
+
}
|
|
420
429
|
let insertedFile = await drive.write(file.name, file);
|
|
421
430
|
insertedFiles.push({
|
|
422
|
-
...
|
|
431
|
+
...d,
|
|
423
432
|
_file: insertedFile,
|
|
424
433
|
});
|
|
434
|
+
indexedData++;
|
|
425
435
|
}
|
|
426
436
|
response = await rest.insertMany(col?.slug, insertedFiles);
|
|
427
437
|
} else if (typeof parseBody?.file == "object") {
|
|
@@ -458,7 +468,9 @@ function HonoInstance(): typeof app {
|
|
|
458
468
|
query: c.req.query,
|
|
459
469
|
});
|
|
460
470
|
if (useCache) {
|
|
461
|
-
let responseFromCache = await cache.get(
|
|
471
|
+
let responseFromCache = await cache.get({
|
|
472
|
+
key: keyCache,
|
|
473
|
+
});
|
|
462
474
|
if (responseFromCache) {
|
|
463
475
|
response = responseFromCache;
|
|
464
476
|
} else {
|