ts: define return type
This commit is contained in:
@@ -17,6 +17,6 @@ export const hashPassword = (password: string): Promise<string> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// password from frontend and hash from database
|
// password from frontend and hash from database
|
||||||
export const comparePassword = (password: string, hash: any) => {
|
export const comparePassword = (password: string, hash: string): Promise<boolean> => {
|
||||||
return bcrypt.compare(password, hash)
|
return bcrypt.compare(password, hash)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user