From 7483a67557ee30911e36c851e7bd5591740ba7f8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 30 Apr 2026 22:45:54 +0300 Subject: [ma] Add missing SPA controls: download, tags, thumbnail/cover regen, upload, filesize display, duration/filesize/tag filters, favorites --- web/js/api.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/js/api.js') 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 }), -- cgit v1.2.3