download 기능 수정

This commit is contained in:
ysj7705 committed 2026-07-23 17:17:24 +09:00
1 parent 80eae206b6
commit f5d880caf5
21 files changed
+461 -122

No files matched your search

+9 -5
View File
@@ -35,12 +35,20 @@ export async function createSession(): Promise<{
}
export async function heartbeat(): Promise<void> {
await fetch('/api/sessions/heartbeat', {
const res = await fetch('/api/sessions/heartbeat', {
method: 'POST',
credentials: 'include',
});
if (!res.ok) {
throw new ApiError(
res.status,
'session_required',
'세션이 만료되었거나 없습니다.',
);
}
}
export async function endSession(): Promise<void> {
await fetch('/api/sessions', {
method: 'DELETE',
@@ -116,7 +124,3 @@ export async function fetchEditorConfig(
}),
);
}
export function downloadDocumentUrl(docId: string): string {
return `/api/documents/${docId}/download`;
}