add : business list for super admin

This commit is contained in:
2026-03-16 14:48:51 +03:30
parent 9ab0078b43
commit ba9aa004fe
8 changed files with 172 additions and 8 deletions
@@ -3,10 +3,11 @@ import { ApiBearerAuth, ApiHeader } from "@nestjs/swagger";
import { AdminRouteGuard } from "../../modules/auth/guards/admin.guard";
import { JwtAuthGuard } from "../../modules/auth/guards/auth.guard";
import { SuperAdminAuthGuard } from "../../modules/auth/guards/superAdminAuth.guard";
export function AuthGuards() {
return applyDecorators(
UseGuards(JwtAuthGuard, AdminRouteGuard),
UseGuards(JwtAuthGuard, AdminRouteGuard, SuperAdminAuthGuard),
ApiBearerAuth("authorization"),
ApiHeader({ name: "x-business-id", description: "Business ID" }),
);
+4
View File
@@ -0,0 +1,4 @@
export const SUPER_ADMIN_ROUTE = "shouldSuperAdmin";
import { SetMetadata } from "@nestjs/common";
export const SuperAdminRoute = (isSuperAdminRoute: boolean = true) => SetMetadata(SUPER_ADMIN_ROUTE, isSuperAdminRoute);