Files
mnote/src/lib/search/record-recent.ts
T

15 lines
396 B
TypeScript
Raw Normal View History

2025-11-23 10:45:45 +08:00
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);
}
}