mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
remove dead code around syncUserToSubscription (#2122)
GitOrigin-RevId: d489365a4bceb9d675e6a75b25be61baa3aa010e
This commit is contained in:
parent
dc6e4b3a12
commit
294ce1a13c
3 changed files with 4 additions and 49 deletions
|
@ -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) {
|
flushProjectToTpds(req, res) {
|
||||||
return projectEntityHandler.flushProjectToThirdPartyDataStore(
|
return projectEntityHandler.flushProjectToThirdPartyDataStore(
|
||||||
req.body.project_id,
|
req.body.project_id,
|
||||||
|
|
|
@ -907,11 +907,6 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||||
AuthorizationMiddleware.ensureUserIsSiteAdmin,
|
AuthorizationMiddleware.ensureUserIsSiteAdmin,
|
||||||
AdminController.dissconectAllUsers
|
AdminController.dissconectAllUsers
|
||||||
)
|
)
|
||||||
webRouter.post(
|
|
||||||
'/admin/syncUserToSubscription',
|
|
||||||
AuthorizationMiddleware.ensureUserIsSiteAdmin,
|
|
||||||
AdminController.syncUserToSubscription
|
|
||||||
)
|
|
||||||
webRouter.post(
|
webRouter.post(
|
||||||
'/admin/flushProjectToTpds',
|
'/admin/flushProjectToTpds',
|
||||||
AuthorizationMiddleware.ensureUserIsSiteAdmin,
|
AuthorizationMiddleware.ensureUserIsSiteAdmin,
|
||||||
|
|
|
@ -47,20 +47,6 @@ block content
|
||||||
button.btn.btn-danger(type="submit") Disconnect all users
|
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.
|
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")
|
tab(heading="TPDS/Dropbox Management")
|
||||||
h3 Flush project to TPDS
|
h3 Flush project to TPDS
|
||||||
.row
|
.row
|
||||||
|
@ -81,7 +67,3 @@ block content
|
||||||
input.form-control(type='text', name='user_id', placeholder='user_id', required)
|
input.form-control(type='text', name='user_id', placeholder='user_id', required)
|
||||||
.form-group
|
.form-group
|
||||||
button.btn-primary.btn(type='submit') Poll
|
button.btn-primary.btn(type='submit') Poll
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue