Skip to content

Commit

Permalink
refactor: email validation error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusbrg committed Jan 30, 2025
1 parent d77adf5 commit 65ddb85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/core/src/routes/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const plugin: FastifyPluginAsyncZodOpenApi = async (app) => {
const checkUser = await getStudentData(ra);

if (!checkUser) {
return reply.badRequest('User does not exist');
return reply.badRequest('O RA digitado não existe. Por favor, tente novamente');
}

const employeePromises = checkUser.email.map(
Expand All @@ -197,7 +197,7 @@ const plugin: FastifyPluginAsyncZodOpenApi = async (app) => {
area: validEmployees[0].unidade_exercicio,
name: validEmployees[0].nome,
});
return reply.badRequest('User must not have contract with UFABC');
return reply.badRequest('O aluno não pode ter contrato de trabalho com a UFABC');
}

return { email: checkUser.email[0] };
Expand Down

0 comments on commit 65ddb85

Please sign in to comment.