diff options
Diffstat (limited to 'apps/web/app')
| -rw-r--r-- | apps/web/app/actions/doers.ts | 7 | ||||
| -rw-r--r-- | apps/web/app/api/store/route.ts | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/web/app/actions/doers.ts b/apps/web/app/actions/doers.ts index 938ef4a4..2f29b457 100644 --- a/apps/web/app/actions/doers.ts +++ b/apps/web/app/actions/doers.ts @@ -171,7 +171,7 @@ export const createMemory = async (input: { pageContent = input.content; noteId = new Date().getTime(); metadata = { - baseUrl: `https://supermemory.ai/note/${noteId}`, + baseUrl: `https://beta.supermemory.ai/?note=${noteId}`, description: `Note created at ${new Date().toLocaleString()}`, image: "https://supermemory.ai/logo.png", title: `${pageContent.slice(0, 20)} ${pageContent.length > 20 ? "..." : ""}`, @@ -224,7 +224,9 @@ export const createMemory = async (input: { let contentId: number | undefined; const saveToDbUrl = - metadata.baseUrl.split("#supermemory-user-")[0] ?? metadata.baseUrl; + (metadata.baseUrl.split("#supermemory-user-")[0] ?? metadata.baseUrl) + + "#supermemory-user-" + + data.user.id; // Insert into database try { @@ -240,6 +242,7 @@ export const createMemory = async (input: { savedAt: new Date(), userId: data.user.id, type, + noteId, }) .returning({ id: storedContent.id }); diff --git a/apps/web/app/api/store/route.ts b/apps/web/app/api/store/route.ts index cab7adec..29d7eec3 100644 --- a/apps/web/app/api/store/route.ts +++ b/apps/web/app/api/store/route.ts @@ -55,7 +55,9 @@ const createMemoryFromAPI = async (input: { let contentId: number | undefined; const saveToDbUrl = - input.data.url.split("#supermemory-user-")[0] ?? input.data.url; + (input.data.url.split("#supermemory-user-")[0] ?? input.data.url) + + "#supermemory-user-" + + input.userId; // Insert into database try { |