Skip to content

Commit 450815b

Browse files
committed
feat: ensure BcryptAdapter returns a hash on success
1 parent f7e0ed9 commit 450815b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/infra/criptography/bcrypt-adapter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export class BcryptAdapter implements Encrypter {
44
constructor (private readonly salt: number) {}
55

66
async encrypt (value: string): Promise<string> {
7-
await bcrypt.hash(value, this.salt)
8-
return ''
7+
const hash = await bcrypt.hash(value, this.salt)
8+
return hash
99
}
1010
}

0 commit comments

Comments
 (0)