mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
10
packages/server/src/modules/Auth/Auth.utils.ts
Normal file
10
packages/server/src/modules/Auth/Auth.utils.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as bcrypt from 'bcrypt';
|
||||
|
||||
export const hashPassword = (password: string): Promise<string> =>
|
||||
new Promise((resolve) => {
|
||||
bcrypt.genSalt(10, (error, salt) => {
|
||||
bcrypt.hash(password, salt, (err, hash: string) => {
|
||||
resolve(hash);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user