remove dead code around syncUserToSubscription (#2122)

GitOrigin-RevId: d489365a4bceb9d675e6a75b25be61baa3aa010e
This commit is contained in:
Timothée Alby 2019-09-04 13:28:45 +02:00 committed by sharelatex
parent dc6e4b3a12
commit 294ce1a13c
3 changed files with 4 additions and 49 deletions

View file

@ -129,28 +129,6 @@ module.exports = AdminController = {
})
},
syncUserToSubscription(req, res) {
const { user_id, subscription_id } = req.body
return RecurlyWrapper.getSubscription(
subscription_id,
{},
(err, subscription) =>
User.findById(user_id, (err, user) =>
SubscriptionHandler.syncSubscriptionToUser(
subscription,
user._id,
function(err) {
logger.log(
{ user_id, subscription_id },
'linked account to subscription'
)
return res.send()
}
)
)
)
},
flushProjectToTpds(req, res) {
return projectEntityHandler.flushProjectToThirdPartyDataStore(
req.body.project_id,

View file

@ -907,11 +907,6 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
AuthorizationMiddleware.ensureUserIsSiteAdmin,
AdminController.dissconectAllUsers
)
webRouter.post(
'/admin/syncUserToSubscription',
AuthorizationMiddleware.ensureUserIsSiteAdmin,
AdminController.syncUserToSubscription
)
webRouter.post(
'/admin/flushProjectToTpds',
AuthorizationMiddleware.ensureUserIsSiteAdmin,

View file

@ -47,20 +47,6 @@ block content
button.btn.btn-danger(type="submit") Disconnect all users
p.small Will force disconnect all users with the editor open. Make sure to close the editor first to avoid them reconnecting.
tab(heading="Subscriptions")
h3 Link Recurly subscription to user
.row
form.form.col-xs-6(method='post',action='/admin/syncUserToSubscription')
input(name="_csrf", type="hidden", value=csrfToken)
.form-group
label(for='subscription_id') subscription_id (in Recurly)
input.form-control(type='text', name='subscription_id', placeholder='subscription_id', required)
.form-group
label(for='user_id') user_id
input.form-control(type='text', name='user_id', placeholder='user_id', required)
.form-group
button.btn-primary.btn(type='submit') Link
tab(heading="TPDS/Dropbox Management")
h3 Flush project to TPDS
.row
@ -81,7 +67,3 @@ block content
input.form-control(type='text', name='user_id', placeholder='user_id', required)
.form-group
button.btn-primary.btn(type='submit') Poll