add: top up saldo supplier
This commit is contained in:
@@ -94,9 +94,11 @@ export class SupplierService {
|
||||
});
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
async findByCode(code: string) {
|
||||
try {
|
||||
return await this.supplierRepository.findOneOrFail(id);
|
||||
return await this.supplierRepository.findOneOrFail({
|
||||
code: code,
|
||||
});
|
||||
} catch (e) {
|
||||
if (e instanceof EntityNotFoundError) {
|
||||
throw new HttpException(
|
||||
|
||||
@@ -16,6 +16,6 @@ import { Supplier } from './entities/supplier.entity';
|
||||
],
|
||||
controllers: [UsersController],
|
||||
providers: [UsersService, SupplierService],
|
||||
exports: [UsersService],
|
||||
exports: [UsersService, SupplierService],
|
||||
})
|
||||
export class UsersModule {}
|
||||
|
||||
Reference in New Issue
Block a user