mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
send invalid_email error type down when sharing project
This commit is contained in:
parent
df9b866bee
commit
696e9d27d6
2 changed files with 1 additions and 3 deletions
|
@ -65,7 +65,7 @@ module.exports = CollaboratorsInviteController =
|
|||
email = EmailHelper.parseEmail(email)
|
||||
if !email? or email == ""
|
||||
logger.log {projectId, email, sendingUserId}, "invalid email address"
|
||||
return res.sendStatus(400)
|
||||
return res.status(400).send({errorReason:"invalid_email"})
|
||||
CollaboratorsInviteController._checkRateLimit sendingUserId, (error, underRateLimit) ->
|
||||
return next(error) if error?
|
||||
if !underRateLimit
|
||||
|
|
|
@ -134,8 +134,6 @@ define [
|
|||
|
||||
if data?.errorReason?
|
||||
$scope.state.errorReason = data?.errorReason
|
||||
else if status? and status == 400
|
||||
$scope.state.errorReason = 'invalid_email'
|
||||
else
|
||||
$scope.state.errorReason = null
|
||||
|
||||
|
|
Loading…
Reference in a new issue