chore: add new feature for checking the user has access to the service or not
This commit is contained in:
@@ -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" }),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user