2018-02-14 15:12:46 +00:00
|
|
|
AuthorizationMiddlewear = require('../Authorization/AuthorizationMiddlewear')
|
|
|
|
AuthenticationController = require('../Authentication/AuthenticationController')
|
|
|
|
LinkedFilesController = require "./LinkedFilesController"
|
|
|
|
|
|
|
|
module.exports =
|
|
|
|
apply: (webRouter) ->
|
|
|
|
webRouter.post '/project/:project_id/linked_file',
|
|
|
|
AuthenticationController.requireLogin(),
|
|
|
|
AuthorizationMiddlewear.ensureUserCanWriteProjectContent,
|
|
|
|
LinkedFilesController.createLinkedFile
|
|
|
|
|
2018-06-01 14:16:27 +00:00
|
|
|
webRouter.post '/project/:project_id/linked_file/:file_id/refresh',
|
|
|
|
AuthenticationController.requireLogin(),
|
|
|
|
AuthorizationMiddlewear.ensureUserCanWriteProjectContent,
|
|
|
|
LinkedFilesController.refreshLinkedFile
|