Skip to content

Commit

Permalink
Merge pull request #104 from Daniel-Alvarenga/main
Browse files Browse the repository at this point in the history
Fix error on validate funcionario
  • Loading branch information
Daniel-Alvarenga authored Nov 23, 2024
2 parents 03f9096 + adb948e commit e5ddfd1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const bcrypt = require('bcrypt');
export class ValidateFuncionarioUseCase {
async execute({ email, temporaryPassword, newPassword }: ValidateFuncionarioDTO): Promise<Pick<Funcionario, "name" | "email" | "cargo" | "validated">> {

if (!email || !temporaryPassword || newPassword) {
throw new AppError("Parâmetros insuficientes ou inválidos.");
if (!email || !temporaryPassword || !newPassword) {
throw new AppError("Parâmetros insuficientes ou inválidos: " + email + temporaryPassword + newPassword);
}

const funcionario = await prisma.funcionario.findFirst({
Expand Down

0 comments on commit e5ddfd1

Please sign in to comment.