add: product price

This commit is contained in:
ilham
2021-12-08 09:16:43 +07:00
parent 426c2ccec8
commit 2e52ae494e
9 changed files with 72 additions and 33 deletions

View File

@@ -10,9 +10,9 @@ export class CoaService {
private coaRepository: Repository<COA>,
) {}
async findByUser(id: string, type: coaType) {
async findByUser(id: string, typeOfCoa: coaType) {
try {
return await this.coaRepository.findOneOrFail({ user: id, type: type });
return await this.coaRepository.findOneOrFail({ user: id, type: typeOfCoa });
} catch (e) {
if (e instanceof EntityNotFoundError) {
throw new HttpException(