chore: add new feature for checking the user has access to the service or not

This commit is contained in:
mahyargdz
2025-08-23 09:48:19 +03:30
parent 8642b8e8d5
commit 29a7299a25
10 changed files with 76 additions and 19 deletions
@@ -1,5 +1,5 @@
import { UseGuards, applyDecorators } from "@nestjs/common";
import { ApiBearerAuth } from "@nestjs/swagger";
import { ApiBearerAuth, ApiHeader } from "@nestjs/swagger";
import { AdminRouteGuard } from "../../modules/auth/guards/admin.guard";
import { JwtAuthGuard } from "../../modules/auth/guards/auth.guard";
@@ -8,6 +8,6 @@ export function AuthGuards() {
return applyDecorators(
UseGuards(JwtAuthGuard, AdminRouteGuard),
ApiBearerAuth("authorization"),
// ApiHeader({ name: "x-business-id", description: "Business ID" }),
ApiHeader({ name: "x-business-id", description: "Business ID" }),
);
}
+1
View File
@@ -422,6 +422,7 @@ export const enum BusinessMessage {
QUOTA_PURCHASE_FAILED = "خرید حجم با خطا مواجه شد",
PAYMENT_GATEWAY_ERROR = "خطا در اتصال به درگاه پرداخت",
QUOTA_UPDATED = "حجم ایمیل با موفقیت به روز شد",
USER_DOES_NOT_HAVE_ACCESS_TO_SERVICE = "کاربر دسترسی به این سرویس را ندارد",
}
export const enum DomainMessage {