Skip to content

Commit

Permalink
[FE] feat: update api(#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
loopy-lim authored Nov 10, 2024
2 parents 3d285f5 + da33d59 commit 4c7ca9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/apis/room/previousRoomApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const getPreviousRoom = async (
export const patchPreviousRoom = async (
dataPk: string, body: PatchConversationDatasRequest
) => {
const { data } = await https.patch(`/conversation-datas/${dataPk}`, body);
const { data } = await https.patch(`/conversations/${dataPk}`, body);
return data;
}

export const getSharedPreviouseRoom = async (shardId: string) => {
const { data } = await https.get(`/conversations/share/${shardId}`);
return data;
}
5 changes: 4 additions & 1 deletion src/components/Conversation/Save/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ const ConversationSaveHeader = ({
onError: () => {
alert("저장에 실패했습니다.");
},
onSuccess: ({ message }: { message: string }) => {
alert(message);
},
onSettled: () => {
navigate("/room");
navigate(`/room/${postId}`);
},
});
};
Expand Down

0 comments on commit 4c7ca9f

Please sign in to comment.