is not empty
This commit is contained in:
@@ -22,11 +22,10 @@ export class BcryptService {
|
||||
const length = 8;
|
||||
const charset =
|
||||
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
const n = charset.length;
|
||||
let password = '';
|
||||
|
||||
for (let i = 0; i < length; i++)
|
||||
password += charset.charAt(Math.floor(Math.random() * n));
|
||||
password += charset.charAt(Math.floor(Math.random() * charset.length));
|
||||
return password;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user