fix bug in admin
This commit is contained in:
@@ -31,21 +31,21 @@ export class AdminController {
|
||||
return admin;
|
||||
}
|
||||
|
||||
@Post()
|
||||
@HttpCode(HttpStatus.CREATED)
|
||||
@ApiOperation({ summary: 'Create a new admin' })
|
||||
@ApiBody({ type: CreateAdminDto })
|
||||
@ApiResponse({ status: 201, description: 'Admin created' })
|
||||
async create(@Body() dto: CreateAdminDto, @RestId() restId: string) {
|
||||
const admin = await this.adminService.createRestaurantBySuperAdmin({
|
||||
phone: dto.phone,
|
||||
firstName: dto.firstName,
|
||||
lastName: dto.lastName,
|
||||
roleId: dto.roleId,
|
||||
restId,
|
||||
});
|
||||
return admin;
|
||||
}
|
||||
// @Post()
|
||||
// @HttpCode(HttpStatus.CREATED)
|
||||
// @ApiOperation({ summary: 'Create a new admin' })
|
||||
// @ApiBody({ type: CreateAdminDto })
|
||||
// @ApiResponse({ status: 201, description: 'Admin created' })
|
||||
// async create(@Body() dto: CreateAdminDto, @RestId() restId: string) {
|
||||
// const admin = await this.adminService.createRestaurantBySuperAdmin({
|
||||
// phone: dto.phone,
|
||||
// firstName: dto.firstName,
|
||||
// lastName: dto.lastName,
|
||||
// roleId: dto.roleId,
|
||||
// restId,
|
||||
// });
|
||||
// return admin;
|
||||
// }
|
||||
|
||||
@Patch(':id')
|
||||
@ApiOperation({ summary: 'Update an admin' })
|
||||
|
||||
Reference in New Issue
Block a user