update: remove the blog from the response of the update or create blog

This commit is contained in:
mahyargdz
2025-09-03 08:59:17 +03:30
parent 672fe9b783
commit 5e0bd3dce7
24 changed files with 526 additions and 385 deletions
+13
View File
@@ -21,3 +21,16 @@ export const UserDec = createParamDecorator((data: keyof ITokenPayload | undefin
// const req = ctx.switchToHttp().getRequest<FastifyRequest>();
// return req.user;
// });
export const UserIpAndHeaders = createParamDecorator((_data: unknown, ctx: ExecutionContext) => {
const req = ctx.switchToHttp().getRequest<FastifyRequest>();
const user = req.user;
return { ip: req.ip, headers: req.headers, userId: user?.id };
});
export interface IUserIpAndHeaders {
ip: string;
headers: Record<string, string>;
userId: string;
}
+1
View File
@@ -151,6 +151,7 @@ export const enum CategoryMessage {
ORDER_SHOULD_BE_INT = "ترتیب دسته بندی باید یک عدد صحیح باشد",
CREATION_FAILED = "ایجاد دسته بندی موفیقیت آمیز نبود",
UPDATE_FAILED = "به روز رسانی دسته بندی موفیقیت آمیز نبود",
CATEGORY_HAS_SERVICES = "دسته بندی دارای سرویس می‌باشد",
}
export const enum ServiceMessage {