diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-30 22:45:54 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-30 22:45:54 +0300 |
| commit | 7483a67557ee30911e36c851e7bd5591740ba7f8 (patch) | |
| tree | e6a3f052b5a5bb6c900d61a9772ad636c44c6a11 /web/js/api.js | |
| parent | 4b7614b5b234181318be38b6ef4b471faf161498 (diff) | |
[ma] Add missing SPA controls: download, tags, thumbnail/cover regen, upload, filesize display, duration/filesize/tag filters, favorites
Diffstat (limited to 'web/js/api.js')
| -rw-r--r-- | web/js/api.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/web/js/api.js b/web/js/api.js index 6c2f0df..02e30c9 100644 --- a/web/js/api.js +++ b/web/js/api.js @@ -55,6 +55,13 @@ export const API = { saveNote: (id, content) => api(`/api/media/${id}/notes`, { method: 'POST', body: { content } }), deleteNote: (id) => api(`/api/media/${id}/notes`, { method: 'DELETE' }), share: (id) => api(`/api/media/${id}/shares`, { method: 'POST' }), + tags: () => api('/api/tags'), + download: (id) => api(`/api/media/${id}/download`), + regenThumbnail: (id) => api(`/api/media/${id}/thumbnail`, { method: 'POST' }), + regenCover: (setId) => api(`/api/sets/${setId}/cover`, { method: 'POST' }), + upload: (setId, formData) => api(`/api/sets/${setId}/upload`, { method: 'POST', body: formData }), + addTag: (id, tag) => api(`/api/media/${id}/tags`, { method: 'POST', body: { tag } }), + removeTag: (id, tag) => api(`/api/media/${id}/tags/${encodeURIComponent(tag)}`, { method: 'DELETE' }), trash: () => api('/api/admin/trash'), users: () => api('/api/admin/users'), createUser: (body) => api('/api/admin/users', { method: 'POST', body }), |
