business list

This commit is contained in:
2026-03-12 12:52:28 +03:30
parent 40826b9381
commit 79d36aa6fe
8 changed files with 90 additions and 21 deletions
+6 -4
View File
@@ -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')