aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/api
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-07-01 20:12:56 -0500
committerDhravya <[email protected]>2024-07-01 20:12:56 -0500
commit2c6a96e96f49439853f68ff18d1502cac04d618c (patch)
treec4b541c4ba21bf1b404722d714d5ab32a2644d90 /apps/web/app/api
parentfix link (diff)
downloadarchived-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.ts6
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 });
}),
);
}