business list
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
|
||||
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';
|
||||
|
||||
@Controller('super-admin/business')
|
||||
@UseGuards(SuperAdminAuthGuard)
|
||||
export class BusinessController {
|
||||
constructor(private readonly businessService: BusinessService) { }
|
||||
|
||||
@@ -14,9 +16,9 @@ export class BusinessController {
|
||||
return this.businessService.setupAccount(dto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.businessService.findAll();
|
||||
@Get('list')
|
||||
findAll(@Query() dto :FindBusinessesDto) {
|
||||
return this.businessService.findAll(dto);
|
||||
}
|
||||
|
||||
// @Get(':id')
|
||||
|
||||
Reference in New Issue
Block a user