mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 16:53:38 +00:00
feat: add mobile support, delete CV/branch, and fix DOCX export with patches
Agent-Logs-Url: https://github.com/velocitatem/cvfs/sessions/4d754ed6-7f63-44e0-8689-123d7a70595f Co-authored-by: velocitatem <60182044+velocitatem@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
300a577fbe
commit
5d815cd24d
@@ -177,3 +177,25 @@ export async function publishVersion(
|
||||
body: JSON.stringify({ version_id: versionId ?? null, submission_id: submissionId ?? null, slug: slug ?? null }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function deleteDocument(documentId: string): Promise<void> {
|
||||
const res = await fetch(`${API}/api/v1/documents/${documentId}`, {
|
||||
method: 'DELETE',
|
||||
headers: { accept: 'application/json', ...getAuthHeader() },
|
||||
});
|
||||
if (!res.ok) {
|
||||
const detail = await res.text().catch(() => res.statusText);
|
||||
throw new Error(detail || `HTTP ${res.status}`);
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteVersion(versionId: string): Promise<void> {
|
||||
const res = await fetch(`${API}/api/v1/versions/${versionId}`, {
|
||||
method: 'DELETE',
|
||||
headers: { accept: 'application/json', ...getAuthHeader() },
|
||||
});
|
||||
if (!res.ok) {
|
||||
const detail = await res.text().catch(() => res.statusText);
|
||||
throw new Error(detail || `HTTP ${res.status}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user