Commit 2b374f4d authored by Lee Soobeom's avatar Lee Soobeom
Browse files

edit

parent f21493ca
...@@ -54,9 +54,9 @@ export function EditPost() { ...@@ -54,9 +54,9 @@ export function EditPost() {
for (var i = 0; i < filelist.length; i++) { for (var i = 0; i < filelist.length; i++) {
formdata.append("picture", filelist?.[i]); formdata.append("picture", filelist?.[i]);
} }
console.log("one file update before"); // console.log("one file update before");
const res = await postApi.updateImgAndPost(user._id, formdata); const res = await postApi.updateImgAndPost(user._id, formdata);
console.log("one file update", res); // console.log("one file update", res);
return res; return res;
} }
}; };
...@@ -72,7 +72,7 @@ export function EditPost() { ...@@ -72,7 +72,7 @@ export function EditPost() {
const updateRes = await updateImg2Db(file); const updateRes = await updateImg2Db(file);
// console.log("find newfilename", updateRes); // console.log("find newfilename", updateRes);
navigate( navigate(
{ pathname: `/post/${post._id}` }, { pathname: `/posts/${post._id}` },
{ replace: true, state: updateRes } { replace: true, state: updateRes }
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment