fix: join address to the customer get by admin
This commit is contained in:
@@ -12,6 +12,7 @@ import { CreateRoleDto } from "./DTO/create-role.dto";
|
||||
import { SearchAdminQueryDto } from "./DTO/search-admins-query.dto";
|
||||
import { SearchCustomersDto } from "./DTO/search-customers.dto";
|
||||
import { SearchRolesQueryDto } from "./DTO/search-roles.dto";
|
||||
import { UpdateCustomerDto } from "./DTO/update-customer.dto";
|
||||
import { UpdateProfileDto } from "./DTO/update-profile.dto";
|
||||
import { CreateUserGroupDto } from "./DTO/user-group.dto";
|
||||
import { EmailVerifyQueryDto } from "./DTO/verify-email-query.dto";
|
||||
@@ -144,11 +145,18 @@ export class UsersController {
|
||||
@ApiOperation({ summary: "Create customer" })
|
||||
@AuthGuards()
|
||||
@HttpCode(HttpStatus.CREATED)
|
||||
@Post("customer")
|
||||
@Post("customers")
|
||||
createCustomer(@Body() createDto: CreateCustomerDto) {
|
||||
return this.customersService.createCustomer(createDto);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "Update customer" })
|
||||
@AuthGuards()
|
||||
@Patch("customers/:id")
|
||||
updateCustomer(@Param() paramDto: ParamDto, @Body() updateDto: UpdateCustomerDto) {
|
||||
return this.customersService.updateCustomer(paramDto.id, updateDto);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "get customers ==> admin route" })
|
||||
@AuthGuards()
|
||||
@PermissionsDec(PermissionEnum.ADMINS, PermissionEnum.CUSTOMERS)
|
||||
|
||||
Reference in New Issue
Block a user