refactor: change the role to roles and many to many
This commit is contained in:
@@ -15,7 +15,6 @@ import { Roles } from "../../common/decorators/roles.decorator";
|
||||
import { UserDec } from "../../common/decorators/user.decorator";
|
||||
import { PaginationDto } from "../../common/DTO/pagination.dto";
|
||||
import { ParamDto } from "../../common/DTO/param.dto";
|
||||
import { Role } from "../users/entities/role.entity";
|
||||
import { RoleEnum } from "../users/enums/role.enum";
|
||||
|
||||
@Controller("payments")
|
||||
@@ -124,8 +123,8 @@ export class PaymentsController {
|
||||
@Roles(RoleEnum.ADMIN, RoleEnum.USER)
|
||||
@ApiOperation({ summary: "get bank account" })
|
||||
@Get("bank-account")
|
||||
getBankAccounts(@UserDec("role") userRole: Role) {
|
||||
return this.paymentsService.getBankAccounts(userRole);
|
||||
getBankAccounts(@UserDec("roles") roles: RoleEnum[]) {
|
||||
return this.paymentsService.getBankAccounts(roles);
|
||||
}
|
||||
|
||||
///------------------- Deposit transfer -----------------------------
|
||||
|
||||
Reference in New Issue
Block a user