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

14 lines
482 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: (app) ->
app.post '/project/new/upload',
AuthenticationController.requireLogin(),
ProjectUploadController.uploadProject
app.post '/Project/:Project_id/upload',
SecurityManager.requestCanModifyProject,
ProjectUploadController.uploadFile