15 lines
396 B
TypeScript
15 lines
396 B
TypeScript
export async function recordRecentPage(workspaceId: string | null, documentId: string) {
|
|
if (!workspaceId) {
|
|
return;
|
|
}
|
|
try {
|
|
await fetch("/api/search/recent", {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify({ workspaceId, documentId }),
|
|
});
|
|
} catch (error) {
|
|
console.error("recordRecentPage failed", error);
|
|
}
|
|
}
|