refactor: change the role to roles and many to many
This commit is contained in:
@@ -46,8 +46,8 @@ export class InvoicesController {
|
||||
@AuthGuards()
|
||||
@Roles(RoleEnum.ADMIN, RoleEnum.USER)
|
||||
@Get(":id")
|
||||
getInvoiceById(@Param() paramDto: ParamDto, @UserDec("role") role: RoleEnum, @UserDec("id") userId: string) {
|
||||
return this.invoiceService.getInvoiceById(paramDto.id, role, userId);
|
||||
getInvoiceById(@Param() paramDto: ParamDto, @UserDec("roles") roles: RoleEnum[], @UserDec("id") userId: string) {
|
||||
return this.invoiceService.getInvoiceById(paramDto.id, roles, userId);
|
||||
}
|
||||
|
||||
@Post(":id/apply-discount")
|
||||
|
||||
Reference in New Issue
Block a user