Merge branch 'development' into 'devops-staging'
Development See merge request empatnusabangsa/ppob/ppob-backend!13
This commit is contained in:
commit
b94c77a431
|
@ -7,7 +7,8 @@ import {
|
|||
Param,
|
||||
Delete,
|
||||
ParseUUIDPipe,
|
||||
HttpStatus, Query,
|
||||
HttpStatus,
|
||||
Query,
|
||||
} from '@nestjs/common';
|
||||
import { RoleService } from './roles.service';
|
||||
|
||||
|
@ -16,11 +17,11 @@ import { RoleService } from './roles.service';
|
|||
version: '1',
|
||||
})
|
||||
export class ConfigurableController {
|
||||
constructor(private readonly usersService: RoleService) {}
|
||||
constructor(private readonly roleService: RoleService) {}
|
||||
|
||||
@Get()
|
||||
@Get('/roles')
|
||||
async findAll(@Query('page') page: number) {
|
||||
const [data, count] = await this.usersService.findAllRoles(page);
|
||||
const [data, count] = await this.roleService.findAllRoles(page);
|
||||
|
||||
return {
|
||||
data,
|
||||
|
@ -33,10 +34,9 @@ export class ConfigurableController {
|
|||
@Get(':id')
|
||||
async findOne(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return {
|
||||
data: await this.usersService.findOne(id),
|
||||
data: await this.roleService.findOne(id),
|
||||
statusCode: HttpStatus.OK,
|
||||
message: 'success',
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,5 +30,5 @@ export class Transactions extends BaseModel {
|
|||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
userDestination: string;
|
||||
user_destination: string;
|
||||
}
|
||||
|
|
|
@ -427,11 +427,9 @@ export class TransactionService {
|
|||
return a.plus(b);
|
||||
}, new Decimal(0));
|
||||
|
||||
const coa = coas.find((it) => {
|
||||
(it) => {
|
||||
return it.id.toLowerCase() === coaId.toLowerCase();
|
||||
};
|
||||
});
|
||||
let coa = coas.find(
|
||||
(it) => it.id.toLowerCase() === coaId.toLowerCase(),
|
||||
);
|
||||
|
||||
let balance = new Decimal(coa.amount);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user