download 기능 수정
This commit is contained in:
1 parent
80eae206b6
commit
f5d880caf5
21 files changed
+461
-122
No files matched your search
@@ -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`;
|
||||
}
|
||||
Reference in new issue
Block a user