Skip to content

Commit

Permalink
remove aluno rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Feb 5, 2025
1 parent 18b42a1 commit 5289c40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions apps/core/src/routes/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@ const plugin: FastifyPluginAsyncZodOpenApi = async (app) => {
const validEmployees = employees.filter((employee) => employee !== null);

if (validEmployees.length > 0) {
request.log.warn('UFABC employee', {
employeeId: validEmployees[0].siape,
area: validEmployees[0].unidade_exercicio,
name: validEmployees[0].nome,
});
request.log.warn('UFABC employee', validEmployees);
return reply.forbidden(
'O aluno não pode ter contrato de trabalho com a UFABC',
);
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/schemas/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const completeUserSchema = {
email: z
.string()
.email()
.refine((val) => val.includes('@aluno.ufabc.edu.br'), {
.refine((val) => val.includes('ufabc.edu.br'), {
message: 'Invalid UFABC email',
}),
}),
Expand Down

0 comments on commit 5289c40

Please sign in to comment.