xvying před 1 rokem
rodič
revize
d8d4e59dbd
2 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. 0 0
      online/static/js/app.js
  2. 8 8
      src/utils/request.js

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 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

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů