Continuação do backend

This commit is contained in:
Joao Maria Araujo do Nascimento
2026-05-25 22:07:54 -03:00
parent 47a68c4856
commit 65111a45f9
11 changed files with 141 additions and 11 deletions
+6
View File
@@ -0,0 +1,6 @@
export class BackendError extends Error {
constructor(message, statusCode = 400){
super(message);
this.statusCode = statusCode;
}
}
+10
View File
@@ -0,0 +1,10 @@
import bcrypt from "bcryptjs";
const senha = "123456"
let senha_hash = await bcrypt.hash(senha, 10);
console.log(senha_hash);
console.log(await bcrypt.compare(senha, senha_hash))