diff options
| author | Dhravya <[email protected]> | 2024-07-01 20:12:56 -0500 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-07-01 20:12:56 -0500 |
| commit | 2c6a96e96f49439853f68ff18d1502cac04d618c (patch) | |
| tree | c4b541c4ba21bf1b404722d714d5ab32a2644d90 /apps/web/app/api | |
| parent | fix link (diff) | |
| download | archived-supermemory-2c6a96e96f49439853f68ff18d1502cac04d618c.tar.xz archived-supermemory-2c6a96e96f49439853f68ff18d1502cac04d618c.zip | |
spaces function
Diffstat (limited to 'apps/web/app/api')
| -rw-r--r-- | apps/web/app/api/store/route.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/web/app/api/store/route.ts b/apps/web/app/api/store/route.ts index a67787c4..d9f99277 100644 --- a/apps/web/app/api/store/route.ts +++ b/apps/web/app/api/store/route.ts @@ -128,10 +128,12 @@ const createMemoryFromAPI = async (input: { .all(); await Promise.all( - spaceData.map(async (space) => { + spaceData.map(async (s) => { await db .insert(contentToSpace) - .values({ contentId: contentId, spaceId: space.id }); + .values({ contentId: contentId, spaceId: s.id }); + + await db.update(space).set({ numItems: s.numItems + 1 }); }), ); } |