@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.
Files changed (2) hide show
  1. package/app/hono.ts +15 -3
  2. 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
- for await (let file of parseBody?.file) {
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
- ...data,
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(keyCache);
471
+ let responseFromCache = await cache.get({
472
+ key: keyCache,
473
+ });
462
474
  if (responseFromCache) {
463
475
  response = responseFromCache;
464
476
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.30.4",
3
+ "version": "0.30.6",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {