feat: add user createOne and refactor code

This commit is contained in:
2026-02-23 09:19:34 +03:30
parent 72a001a150
commit 63b4567166
13 changed files with 192 additions and 110 deletions
@@ -1,6 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-return */
import { Injectable } from '@nestjs/common';
import { HashingProvider } from './hashing.provider';
import * as bcrypt from 'bcrypt';
@@ -8,9 +5,9 @@ import * as bcrypt from 'bcrypt';
@Injectable()
export class BcryptProvider implements HashingProvider {
public async hash(data: string | Buffer): Promise<string> {
const salt = (await bcrypt.genSalt()) as string;
const salt = await bcrypt.genSalt();
return (await bcrypt.hash(data, salt)) as string;
return await bcrypt.hash(data, salt);
}
public async compare(