From afde7b96ad3e251d429238907c87612b812829e6 Mon Sep 17 00:00:00 2001 From: algafur Date: Mon, 7 Oct 2024 11:39:25 +0500 Subject: [PATCH] fix --- src/features/settings/new-post/new-post.tsx | 3 ++- src/features/settings/new-user/new-user.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/settings/new-post/new-post.tsx b/src/features/settings/new-post/new-post.tsx index e6c714b..4948243 100644 --- a/src/features/settings/new-post/new-post.tsx +++ b/src/features/settings/new-post/new-post.tsx @@ -43,7 +43,7 @@ export const NewPost: FC = ({ open, handeOpen, item, refetch }) = res.data.map((item: IUsersForPostsResponse) => { return { label: item.user.name, - value: item.id, + value: item.user.id, } }), ) @@ -70,6 +70,7 @@ export const NewPost: FC = ({ open, handeOpen, item, refetch }) = // user: user, // })) // : [] + await axiosInstance.patch(`/posts/${item.id}`, { ...data, name: data.name.trim(), diff --git a/src/features/settings/new-user/new-user.tsx b/src/features/settings/new-user/new-user.tsx index 594cb1b..f9a1963 100644 --- a/src/features/settings/new-user/new-user.tsx +++ b/src/features/settings/new-user/new-user.tsx @@ -75,7 +75,7 @@ export const NewUser: FC = ({ open, handleModal, item, refetch }) res.data.map((item: IPostsForUsersResponse) => { return { label: item.post.name, - value: item.id, + value: item.post.id, } }), )