fixed api routes

This commit is contained in:
2023-06-12 05:02:59 +02:00
parent c036418a87
commit 23aa9e4e2f
6 changed files with 197 additions and 41 deletions
+14
View File
@@ -0,0 +1,14 @@
import { hash, compare } from "bcrypt";
export async function validatePassword(password:string, hashString:string){
const result = await compare(password, hashString);
return result;
}
export async function hashPassword(password:string){
const hashString = await hash(password, 10);
return hashString;
}
export default { validatePassword, hashPassword };