mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 23:29:33 +00:00
Use same error format
This commit is contained in:
parent
c1329f2284
commit
d598cfaf71
@ -283,7 +283,7 @@ module.exports = {
|
|||||||
null,
|
null,
|
||||||
formatError({
|
formatError({
|
||||||
id: 'Auth.form.error.email.format',
|
id: 'Auth.form.error.email.format',
|
||||||
message: 'Please provide valid email address.',
|
message: 'Please provide a valid email address.',
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -312,7 +312,13 @@ module.exports = {
|
|||||||
|
|
||||||
// User blocked
|
// User blocked
|
||||||
if (user.blocked) {
|
if (user.blocked) {
|
||||||
return ctx.badRequest('blocked.user');
|
return ctx.badRequest(
|
||||||
|
null,
|
||||||
|
formatError({
|
||||||
|
id: 'Auth.form.error.user.blocked',
|
||||||
|
message: 'This user is disabled.',
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate random token.
|
// Generate random token.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user