Archived
1
0

feat: add test for hash when error (#4814)

This commit is contained in:
Joe Previte
2022-02-03 14:22:16 -07:00
committed by GitHub
parent fd643dcbc3
commit 00224fa73a
2 changed files with 5 additions and 6 deletions

View File

@ -157,12 +157,7 @@ export const generatePassword = async (length = 24): Promise<string> => {
* Used to hash the password.
*/
export const hash = async (password: string): Promise<string> => {
try {
return await argon2.hash(password)
} catch (error: any) {
logger.error(error)
return ""
}
return await argon2.hash(password)
}
/**