mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 11:01:56 +02:00
send invalid_email error type down when sharing project
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user