From 2946d07fc8da92abe0a5b7c452938b12a49b2087 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Fri, 19 Apr 2019 01:47:11 -0400 Subject: [PATCH] fix(editor): missing routes --- src/controllers/api.js | 1 + src/controllers/api/v1/routes.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/controllers/api.js b/src/controllers/api.js index 52a9d901a..d444b77db 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -41,6 +41,7 @@ apiController.v1.reports = apiReportsV1 apiController.v1.settings = apiSettingsV1 apiController.v1.plugins = apiPluginsV1 apiController.v1.roles = require('./api/v1/roles') +apiController.v1.editor = require('./api/v1/editor') apiController.v2 = {} apiController.v2.common = require('./api/v2/common') diff --git a/src/controllers/api/v1/routes.js b/src/controllers/api/v1/routes.js index 5629ff0a0..601ba7279 100644 --- a/src/controllers/api/v1/routes.js +++ b/src/controllers/api/v1/routes.js @@ -180,4 +180,12 @@ module.exports = function (middleware, router, controllers) { router.post('/api/v1/backup/restore', apiv1, isAdmin, controllers.backuprestore.restoreBackup) router.post('/api/v1/backup/upload', apiv1, isAdmin, controllers.backuprestore.uploadBackup) router.get('/api/v1/backup/hastools', apiv1, isAdmin, controllers.backuprestore.hasBackupTools) + + // Editor + + router.get('/api/v1/editor/load/:id', apiv1, isAdmin, controllers.editor.load) + router.post('/api/v1/editor/save', apiv1, isAdmin, controllers.editor.save) + router.get('/api/v1/editor/assets', apiv1, isAdmin, controllers.editor.getAssets) + router.post('/api/v1/editor/assets/remove', apiv1, isAdmin, controllers.editor.removeAsset) + router.post('/api/v1/editor/assets/upload', apiv1, isAdmin, controllers.editor.assetsUpload) }