mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Remove deprecated endpoint for old delete-user
This commit is contained in:
parent
a4167fcccd
commit
dc62b1a86e
3 changed files with 0 additions and 19 deletions
|
@ -15,14 +15,6 @@ settings = require "settings-sharelatex"
|
|||
|
||||
module.exports = UserController =
|
||||
|
||||
# TODO: deprecated, remove
|
||||
deleteUser: (req, res)->
|
||||
user_id = AuthenticationController.getLoggedInUserId(req)
|
||||
UserDeleter.deleteUser user_id, (err)->
|
||||
if !err?
|
||||
req.session?.destroy()
|
||||
res.sendStatus(200)
|
||||
|
||||
tryDeleteUser: (req, res, next) ->
|
||||
user_id = AuthenticationController.getLoggedInUserId(req)
|
||||
password = req.body.password
|
||||
|
|
|
@ -92,7 +92,6 @@ module.exports = class Router
|
|||
webRouter.post '/user/sessions/clear', AuthenticationController.requireLogin(), UserController.clearSessions
|
||||
|
||||
webRouter.delete '/user/newsletter/unsubscribe', AuthenticationController.requireLogin(), UserController.unsubscribe
|
||||
webRouter.delete '/user', AuthenticationController.requireLogin(), UserController.deleteUser
|
||||
webRouter.post '/user/delete', AuthenticationController.requireLogin(), UserController.tryDeleteUser
|
||||
|
||||
webRouter.get '/user/personal_info', AuthenticationController.requireLogin(), UserInfoController.getLoggedInUsersPersonalInfo
|
||||
|
|
|
@ -85,16 +85,6 @@ describe "UserController", ->
|
|||
json: sinon.stub()
|
||||
@next = sinon.stub()
|
||||
|
||||
describe "deleteUser", ->
|
||||
|
||||
it "should delete the user", (done)->
|
||||
|
||||
@res.sendStatus = (code)=>
|
||||
@UserDeleter.deleteUser.calledWith(@user_id)
|
||||
code.should.equal 200
|
||||
done()
|
||||
@UserController.deleteUser @req, @res
|
||||
|
||||
describe 'tryDeleteUser', ->
|
||||
|
||||
beforeEach ->
|
||||
|
|
Loading…
Reference in a new issue