overleaf/services/web/app/coffee/Features/Uploads/UploadsRouter.coffee

14 lines
511 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
SecurityManager = require('../../managers/SecurityManager')
AuthenticationController = require('../Authentication/AuthenticationController')
ProjectUploadController = require "./ProjectUploadController"
module.exports =
apply: (webRouter, apiRouter) ->
webRouter.post '/project/new/upload',
2014-02-12 05:23:40 -05:00
AuthenticationController.requireLogin(),
ProjectUploadController.uploadProject
webRouter.post '/Project/:Project_id/upload',
2014-02-12 05:23:40 -05:00
SecurityManager.requestCanModifyProject,
ProjectUploadController.uploadFile