add archives api

This commit is contained in:
Girish Ramakrishnan
2024-12-09 21:33:26 +01:00
parent 5907975c02
commit 9200e6fc63
7 changed files with 189 additions and 2 deletions
+5
View File
@@ -161,6 +161,11 @@ async function initializeExpressSync() {
router.post('/api/v1/backups/policy', json, token, authorizeOwner, routes.backups.setPolicy);
router.post('/api/v1/backups/:backupId', json, token, authorizeAdmin, routes.backups.update);
// app archive routes
router.get ('/api/v1/archives', token, authorizeAdmin, routes.archives.list);
router.get ('/api/v1/archives/:id', token, authorizeAdmin, routes.archives.load, routes.archives.get);
router.del ('/api/v1/archives/:id', token, authorizeAdmin, routes.archives.load, routes.archives.del);
// working off the user behind the provided token
router.get ('/api/v1/profile', token, authorizeUser, routes.profile.get);
router.post('/api/v1/profile/display_name', json, token, authorizeUser, routes.profile.canEditProfile, routes.profile.setDisplayName);