mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fixup mixed indentation
This commit is contained in:
parent
20835a79e2
commit
1df5b0b942
5 changed files with 9 additions and 11 deletions
|
@ -159,9 +159,7 @@ module.exports = AuthenticationController =
|
|||
return isValid
|
||||
|
||||
_redirectToLoginOrRegisterPage: (req, res)->
|
||||
if (req.query.zipUrl? or
|
||||
req.query.project_name? or
|
||||
req.path == '/user/subscription/new')
|
||||
if (req.query.zipUrl? or req.query.project_name? or req.path == '/user/subscription/new')
|
||||
return AuthenticationController._redirectToRegisterPage(req, res)
|
||||
else
|
||||
AuthenticationController._redirectToLoginPage(req, res)
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = HealthCheckController =
|
|||
check: (req, res, next = (error) ->) ->
|
||||
d = domain.create()
|
||||
d.on "error", (error) ->
|
||||
logger.err err: error, "error in mocha"
|
||||
logger.err err: error, "error in mocha"
|
||||
d.run () ->
|
||||
mocha = new Mocha(reporter: Reporter(res), timeout: 10000)
|
||||
mocha.addFile("test/smoke/js/SmokeTests.js")
|
||||
|
|
|
@ -163,8 +163,8 @@ module.exports = UserController =
|
|||
logger.log user: user, "passwords do not match"
|
||||
res.send
|
||||
message:
|
||||
type:'error'
|
||||
text:'Your passwords do not match'
|
||||
type:'error'
|
||||
text:'Your passwords do not match'
|
||||
else
|
||||
logger.log user: user, "password changed"
|
||||
AuthenticationManager.setUserPassword user._id, newPassword1, (error) ->
|
||||
|
@ -179,5 +179,5 @@ module.exports = UserController =
|
|||
logger.log user_id: user_id, "current password wrong"
|
||||
res.send
|
||||
message:
|
||||
type:'error'
|
||||
text:'Your old password is wrong'
|
||||
type:'error'
|
||||
text:'Your old password is wrong'
|
||||
|
|
|
@ -341,7 +341,7 @@ describe "AuthenticationController", ->
|
|||
_id:@user_id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result = @AuthenticationController.getLoggedInUserId @req
|
||||
expect(result).to.equal @user_id
|
||||
|
||||
|
|
|
@ -41,11 +41,11 @@ describe 'ExportsController', ->
|
|||
it 'should ask the handler to return the status of an export', (done) ->
|
||||
@handler.fetchExport = sinon.stub().yields(
|
||||
null,
|
||||
"{\"id\":897, \"status_summary\":\"completed\"}")
|
||||
"{\"id\":897, \"status_summary\":\"completed\"}")
|
||||
|
||||
@req.params = {project_id: project_id, export_id: 897}
|
||||
@controller.exportStatus @req, send:(body) =>
|
||||
expect(body).to.deep.equal {export_json: {
|
||||
status_summary: 'completed', status_detail: undefined
|
||||
status_summary: 'completed', status_detail: undefined
|
||||
}}
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue