Namespace the document route under /doc/

This commit is contained in:
Shane Kilkelly 2017-06-13 10:57:51 +01:00
parent d1a85304d2
commit c25b6b792d
2 changed files with 2 additions and 2 deletions

View file

@ -195,7 +195,7 @@ module.exports = class Router
webRouter.get '/project/download/zip', AuthorizationMiddlewear.ensureUserCanReadMultipleProjects, ProjectDownloadsController.downloadMultipleProjects
webRouter.get '/project/:project_id/labels', AuthorizationMiddlewear.ensureUserCanReadProject, AuthenticationController.requireLogin(), LabelsController.getAllLabels
webRouter.get '/project/:project_id/:doc_id/labels', AuthorizationMiddlewear.ensureUserCanReadProject, AuthenticationController.requireLogin(), LabelsController.getLabelsForDoc
webRouter.get '/project/:project_id/doc/:doc_id/labels', AuthorizationMiddlewear.ensureUserCanReadProject, AuthenticationController.requireLogin(), LabelsController.getLabelsForDoc
webRouter.get '/tag', AuthenticationController.requireLogin(), TagsController.getAllTags
webRouter.post '/tag', AuthenticationController.requireLogin(), TagsController.createTag

View file

@ -35,7 +35,7 @@ define [
labels.loadDocLabelsFromServer = (docId) ->
$http
.get("/project/#{window.project_id}/#{docId}/labels")
.get("/project/#{window.project_id}/doc/#{docId}/labels")
.success (data) ->
if data.docId and data.labels
state.documents[data.docId] = data.labels