mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Remove old controller
This commit is contained in:
parent
843f1c6b35
commit
677b3c759d
1 changed files with 0 additions and 36 deletions
|
@ -1,36 +0,0 @@
|
||||||
# UserGetter = require '../User/UserGetter'
|
|
||||||
# UserUpdater = require '../User/UserUpdater'
|
|
||||||
# OneTimeTokenHandler = require '../Security/OneTimeTokenHandler'
|
|
||||||
# logger = require 'logger-sharelatex'
|
|
||||||
# Settings = require 'settings-sharelatex'
|
|
||||||
|
|
||||||
|
|
||||||
# module.exports = AccountMergeEmailController =
|
|
||||||
|
|
||||||
# confirmMergeFromEmail: (req, res, next) ->
|
|
||||||
# token = req.query.token
|
|
||||||
# if !token
|
|
||||||
# return res.status(400).send()
|
|
||||||
# OneTimeTokenHandler.getValueFromTokenAndExpire 'account-merge-email-to-ol', token, (err, data) ->
|
|
||||||
# return next(err) if err?
|
|
||||||
# if !data
|
|
||||||
# return res.status(404).send()
|
|
||||||
# if data.origin != 'sl'
|
|
||||||
# logger.log {}, "Only sharelatex origin supported"
|
|
||||||
# return res.status(501).send()
|
|
||||||
# { sl_id, v1_id, final_email } = data
|
|
||||||
# UserGetter.getUser sl_id, {_id: 1, overleaf: 1}, (err, user) ->
|
|
||||||
# return next(err) if err?
|
|
||||||
# if !user?
|
|
||||||
# logger.err {userId: sl_id}, 'SL user not found for account-merge'
|
|
||||||
# return res.status(400).send()
|
|
||||||
# if user?.overleaf?.id?
|
|
||||||
# logger.err {userId: sl_id}, 'SL user is already linked to overleaf'
|
|
||||||
# return res.status(400).send()
|
|
||||||
# logger.log {sl_id, v1_id, final_email, origin: data.origin},
|
|
||||||
# "[AccountMergeEmailController] about to merge sharelatex and overleaf-v1 accounts"
|
|
||||||
# UserUpdater.mergeSharelatexAndV1Accounts sl_id, v1_id, final_email, (err) ->
|
|
||||||
# return next(err) if err?
|
|
||||||
# res.render 'account_merge/finish', {
|
|
||||||
# finalEmail: final_email
|
|
||||||
# }
|
|
Loading…
Reference in a new issue