business remove
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards, Query } from '@nestjs/common';
|
||||
import { BusinessService } from './business.service';
|
||||
import { SetupBusinessDto } from './dto/create-business.dto';
|
||||
import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||
import { SuperAdminAuthGuard } from '../auth/guards/superAdminAuth.guard';
|
||||
import { FindBusinessesDto } from './dto/find-businesses.dto';
|
||||
// import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||
|
||||
@Controller('super-admin/business')
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
export class BusinessController {
|
||||
constructor(private readonly businessService: BusinessService) { }
|
||||
|
||||
@Post('setup')
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
create(@Body() dto: SetupBusinessDto) {
|
||||
return this.businessService.setupAccount(dto);
|
||||
}
|
||||
|
||||
@Get('list')
|
||||
findAll(@Query() dto :FindBusinessesDto) {
|
||||
findAll(@Query() dto: FindBusinessesDto) {
|
||||
return this.businessService.findAll(dto);
|
||||
}
|
||||
|
||||
@@ -26,13 +20,18 @@ export class BusinessController {
|
||||
// return this.businessService.fin(id);
|
||||
// }
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateBusinessDto: UpdateBusinessDto) {
|
||||
return this.businessService.update(+id, updateBusinessDto);
|
||||
// @Patch(':id')
|
||||
// update(@Param('id') id: string, @Body() updateBusinessDto: UpdateBusinessDto) {
|
||||
// return this.businessService.update(+id, updateBusinessDto);
|
||||
// }
|
||||
|
||||
@Post('setup')
|
||||
create(@Body() dto: SetupBusinessDto) {
|
||||
return this.businessService.setupAccount(dto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.businessService.remove(+id);
|
||||
return this.businessService.hardDelete(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user