update , remove endpoints
This commit is contained in:
@@ -3,7 +3,7 @@ import { BusinessService } from './business.service';
|
||||
import { SetupBusinessDto } from './dto/setup-business.dto';
|
||||
import { SuperAdminAuthGuard } from '../auth/guards/superAdminAuth.guard';
|
||||
import { FindBusinessesDto } from './dto/find-businesses.dto';
|
||||
// import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||
import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||
|
||||
@Controller('super-admin/business')
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
@@ -15,15 +15,15 @@ export class BusinessController {
|
||||
return this.businessService.findAll(dto);
|
||||
}
|
||||
|
||||
// @Get(':id')
|
||||
// findOne(@Param('id') id: string) {
|
||||
// return this.businessService.fin(id);
|
||||
// }
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.businessService.findByIdOrFail(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) {
|
||||
|
||||
Reference in New Issue
Block a user