xvying hai 1 ano
pai
achega
d8d4e59dbd
Modificáronse 2 ficheiros con 8 adicións e 8 borrados
  1. 0 0
      online/static/js/app.js
  2. 8 8
      src/utils/request.js

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
online/static/js/app.js


+ 8 - 8
src/utils/request.js

@@ -22,14 +22,14 @@ const service = axios.create({
 service.interceptors.request.use(
   (config) => {
     // do something before request is sent
-    // if (config.method.toUpperCase() == "PUT") {
-    //   config.method = "POST";
-    //   config.headers["X-HTTP-Method-Override"] = "PUT";
-    // }
-    // if (config.method.toUpperCase() == "DELETE") {
-    //   config.method = "POST";
-    //   config.headers["X-HTTP-Method-Override"] = "DELETE";
-    // }
+    if (config.method.toUpperCase() == "PUT") {
+      config.method = "POST";
+      config.headers["X-HTTP-Method-Override"] = "PUT";
+    }
+    if (config.method.toUpperCase() == "DELETE") {
+      config.method = "POST";
+      config.headers["X-HTTP-Method-Override"] = "DELETE";
+    }
     if (store.getters.token) {
       // let each request carry token
       // ['X-Token'] is a custom headers key

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio