2014-08-13 12:26:18 -04:00
|
|
|
DropboxUserController = require './DropboxUserController'
|
|
|
|
DropboxWebhookController = require './DropboxWebhookController'
|
2014-11-06 07:41:00 -05:00
|
|
|
DropboxProjectController = require "./DropboxProjectController"
|
|
|
|
SecurityManager = require "../../managers/SecurityManager"
|
2014-08-13 12:26:18 -04:00
|
|
|
|
|
|
|
module.exports =
|
|
|
|
apply: (app) ->
|
|
|
|
app.get '/dropbox/beginAuth', DropboxUserController.redirectUserToDropboxAuth
|
|
|
|
app.get '/dropbox/completeRegistration', DropboxUserController.completeDropboxRegistration
|
|
|
|
app.get '/dropbox/unlink', DropboxUserController.unlinkDropbox
|
|
|
|
|
|
|
|
app.get '/dropbox/webhook', DropboxWebhookController.verify
|
|
|
|
app.post '/dropbox/webhook', DropboxWebhookController.webhook
|
|
|
|
app.ignoreCsrf('post', '/dropbox/webhook')
|
|
|
|
|
2014-11-06 07:41:00 -05:00
|
|
|
app.get '/project/:Project_id/dropbox/status', SecurityManager.requestIsOwner, DropboxProjectController.getStatus
|
2014-08-13 12:26:18 -04:00
|
|
|
|
|
|
|
|