Resolved conflict
This commit is contained in:
commit
d20ec58b0e
2 files changed
+61
-17
No files matched your search
@@ -47,13 +47,17 @@ export const update = createAsyncThunk(
|
||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
||||
|
||||
const fd = new FormData();
|
||||
const imageResult = await axiosInstance.get(form.file, {
|
||||
responseType: "blob",
|
||||
baseURL: "",
|
||||
});
|
||||
fd.append("firstname", form.firstname);
|
||||
fd.append("lastname", form.lastname);
|
||||
fd.append("profileImage", imageResult.data);
|
||||
if (form.file && form.file !== "") {
|
||||
const imageResult = await axiosInstance.get(form.file, {
|
||||
responseType: "blob",
|
||||
baseURL: "",
|
||||
});
|
||||
fd.append("profileImage", imageResult.data);
|
||||
}
|
||||
form.deleteProfileImage &&
|
||||
fd.append("deleteProfileImage", form.deleteProfileImage);
|
||||
|
||||
const res = await axiosInstance.post(`/auth/user/${user._id}`, fd, {
|
||||
headers: {
|
||||
|
||||
Reference in new issue
Block a user