mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-28 13:29:07 +00:00
FEAT: terms of use
This commit is contained in:
@@ -86,6 +86,14 @@ export function EnrichErrorCode(code: string) {
|
||||
code,
|
||||
};
|
||||
|
||||
case ErrorCodes.TERMS_OF_USE.REQUIRED:
|
||||
return {
|
||||
statusCode: HttpStatus.FORBIDDEN,
|
||||
error: 'Não autorizado',
|
||||
message: 'É necessário aceitar os termos de uso para prosseguir',
|
||||
code,
|
||||
};
|
||||
|
||||
case ErrorCodes.RATE_LIMIT:
|
||||
return {
|
||||
statusCode: HttpStatus.TOO_MANY_REQUESTS,
|
||||
|
||||
@@ -14,11 +14,16 @@ export const AUTH = {
|
||||
WEAK_NEW_PASSWORD: 'AUTH.WEAK_NEW_PASSWORD',
|
||||
};
|
||||
|
||||
const TERMS_OF_USE = {
|
||||
REQUIRED: 'TERMS_OF_USE.REQUIRED',
|
||||
};
|
||||
|
||||
const ErrorCodes = {
|
||||
UNKNOWN: 'UNKNOWN',
|
||||
RATE_LIMIT: 'RATE_LIMIT',
|
||||
INTERNAL: 'INTERNAL',
|
||||
AUTH,
|
||||
TERMS_OF_USE,
|
||||
};
|
||||
|
||||
export default ErrorCodes;
|
||||
|
||||
Reference in New Issue
Block a user