fixed api routes
This commit is contained in:
@@ -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 };
|
||||
Reference in New Issue
Block a user