Skip to content

Commit

Permalink
fix(editor): missing routes
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Apr 19, 2019
1 parent eddc577 commit 2946d07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
8 changes: 8 additions & 0 deletions src/controllers/api/v1/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.