Skip to content
Permalink
Browse files

fix(editor): missing routes

  • Loading branch information...
polonel committed Apr 19, 2019
1 parent eddc577 commit 2946d07fc8da92abe0a5b7c452938b12a49b2087
Showing with 9 additions and 0 deletions.
  1. +1 −0 src/controllers/api.js
  2. +8 −0 src/controllers/api/v1/routes.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')
@@ -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)
}

0 comments on commit 2946d07

Please sign in to comment.
You can’t perform that action at this time.