Skip to content

Commit

Permalink
Fix: change request to PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
predict-woo authored and hwmin414 committed Mar 12, 2024
1 parent ac4d1be commit 2944418
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/web/src/components/ModalPopup/ModalMypageModify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ const ButtonProfileImage = () => {
},
});
if (data.url) {
const res = await axiosOri.put(data.url, image);
if (res.status === 204) {
const res = await axiosOri({
url: data.url,
method: "put",
headers: {
"Content-Type": image.type,
},
data: image,
});
if (res.status === 200) {
const data2 = await axios({
url: "/users/editProfileImg/done",
method: "get",
Expand Down

0 comments on commit 2944418

Please sign in to comment.