mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
fix(server): should allowed email addresses and domain be irrespective.
This commit is contained in:
@@ -277,30 +277,18 @@ export default class AuthenticationController extends BaseController {
|
||||
],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SIGNUP_NOT_ALLOWED_EMAIL_DOMAIN') {
|
||||
if (error.errorType === 'SIGNUP_RESTRICTED_NOT_ALLOWED') {
|
||||
return res.status(400).send({
|
||||
errors: [
|
||||
{
|
||||
type: 'SIGNUP_NOT_ALLOWED_EMAIL_DOMAIN',
|
||||
type: 'SIGNUP_RESTRICTED_NOT_ALLOWED',
|
||||
message:
|
||||
'Sign-up is restricted the given email domain is not allowed to sign-up.',
|
||||
'Sign-up is restricted the given email address is not allowed to sign-up.',
|
||||
code: 710,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SIGNUP_NOT_ALLOWED_EMAIL_ADDRESS') {
|
||||
return res.status(400).send({
|
||||
errors: [
|
||||
{
|
||||
type: 'SIGNUP_NOT_ALLOWED_EMAIL_ADDRESS',
|
||||
message:
|
||||
'The sign-up restricted the given email address is not allowed to sign-up.',
|
||||
code: 720,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
}
|
||||
next(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user