mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-10 04:00:11 +00:00
fix
This commit is contained in:
parent
5b759b2c29
commit
fef159cdcb
2 changed files with 10 additions and 4 deletions
|
|
@ -424,7 +424,7 @@ export async function updateMemory(
|
|||
console.log("adding with:", `${updated.url}-${user.email}`)
|
||||
// Add to vectorDB
|
||||
const res = (await Promise.race([
|
||||
fetch("https://cf-ai-backend.dhravya.workers.dev/edit?uniqueUrl="+updated.url , {
|
||||
fetch("https://cf-ai-backend.dhravya.workers.dev/edit", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"X-Custom-Auth-Key": env.BACKEND_SECURITY_KEY,
|
||||
|
|
@ -434,6 +434,7 @@ export async function updateMemory(
|
|||
title: updated.title,
|
||||
url: updated.url,
|
||||
user: user.email,
|
||||
uniqueUrl: updated.url,
|
||||
}),
|
||||
}),
|
||||
new Promise((_, reject) =>
|
||||
|
|
@ -520,11 +521,15 @@ export async function deleteMemory(id: number) {
|
|||
|
||||
console.log("adding with:", `${deleted.url}-${user.email}`)
|
||||
const res = (await Promise.race([
|
||||
fetch(`https://cf-ai-backend.dhravya.workers.dev/delete?websiteUrl=${deleted.url}&user=${user.email}` , {
|
||||
fetch(`https://cf-ai-backend.dhravya.workers.dev/delete` , {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"X-Custom-Auth-Key": env.BACKEND_SECURITY_KEY,
|
||||
}
|
||||
},
|
||||
body: JSON.stringify({
|
||||
websiteUrl: deleted.url,
|
||||
user: user.email
|
||||
})
|
||||
}),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => reject(new Error("Request timed out")), 40000),
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ export default function Main({ sidebarOpen }: { sidebarOpen: boolean }) {
|
|||
}),
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
console.log("sources", sourcesResponse)
|
||||
|
||||
const sourcesInJson = getIdsFromSource(((await sourcesResponse.json()) as {
|
||||
ids: string[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue