update: remove the blog from the response of the update or create blog
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ export const enum CategoryMessage {
|
||||
ORDER_SHOULD_BE_INT = "ترتیب دسته بندی باید یک عدد صحیح باشد",
|
||||
CREATION_FAILED = "ایجاد دسته بندی موفیقیت آمیز نبود",
|
||||
UPDATE_FAILED = "به روز رسانی دسته بندی موفیقیت آمیز نبود",
|
||||
CATEGORY_HAS_SERVICES = "دسته بندی دارای سرویس میباشد",
|
||||
}
|
||||
|
||||
export const enum ServiceMessage {
|
||||
|
||||
Reference in New Issue
Block a user