summaryrefslogtreecommitdiff
path: root/web/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/api.js')
-rw-r--r--web/js/api.js7
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 }),