Move recurly callback to the public api router.

This commit is contained in:
Shane Kilkelly 2017-07-20 13:51:11 +01:00
parent 40834e3534
commit 8e55b77055
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ SubscriptionGroupController = require './SubscriptionGroupController'
Settings = require "settings-sharelatex"
module.exports =
apply: (webRouter, apiRouter) ->
apply: (webRouter, privateApiRouter, publicApiRouter) ->
return unless Settings.enableSubscriptions
webRouter.get '/user/subscription/plans', SubscriptionController.plansPage
@ -35,7 +35,7 @@ module.exports =
webRouter.get '/user/subscription/:subscription_id/group/successful-join', AuthenticationController.requireLogin(), SubscriptionGroupController.renderSuccessfulJoinPage
#recurly callback
apiRouter.post '/user/subscription/callback', SubscriptionController.recurlyNotificationParser, SubscriptionController.recurlyCallback
publicApiRouter.post '/user/subscription/callback', SubscriptionController.recurlyNotificationParser, SubscriptionController.recurlyCallback
#user changes their account state
webRouter.post '/user/subscription/create', AuthenticationController.requireLogin(), SubscriptionController.createSubscription

View file

@ -69,7 +69,7 @@ module.exports = class Router
EditorRouter.apply(webRouter, privateApiRouter)
CollaboratorsRouter.apply(webRouter, privateApiRouter)
SubscriptionRouter.apply(webRouter, privateApiRouter)
SubscriptionRouter.apply(webRouter, privateApiRouter, publicApiRouter)
UploadsRouter.apply(webRouter, privateApiRouter)
PasswordResetRouter.apply(webRouter, privateApiRouter)
StaticPagesRouter.apply(webRouter, privateApiRouter)