icenaked 3 лет назад
Родитель
Сommit
288227da7b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/api/pic.js

+ 2 - 2
src/api/pic.js

@@ -13,7 +13,7 @@ export const UploadFile = payload => {
     return axios.post(`${PIC_MODULE}/upload`, {
     return axios.post(`${PIC_MODULE}/upload`, {
         userId, file, fileName
         userId, file, fileName
     }).then(res => {
     }).then(res => {
-        return res.data;
+        return res;
     });
     });
 }
 }
 
 
@@ -26,7 +26,7 @@ export const GetAllFile = payload => {
     console.log(payload);
     console.log(payload);
     const {userId} = payload;
     const {userId} = payload;
     return axios.get(`${PIC_MODULE}/get/all/proj`, {params:{userId:userId}}).then(res => {
     return axios.get(`${PIC_MODULE}/get/all/proj`, {params:{userId:userId}}).then(res => {
-        return res.data;
+        return res;
     });
     });
 }
 }