Rename route to get variants array to avoid conflicts with variants/ folder
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 24 May 2022 19:49:34 +0000 (21:49 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 24 May 2022 19:49:34 +0000 (21:49 +0200)
client/src/store.js
client/src/views/Variants.vue
server/routes/variants.js

index d57a7f5..f8b6b24 100644 (file)
@@ -19,7 +19,7 @@ export const store = {
       "X-Requested-With": "XMLHttpRequest"
     };
     fetch(
-      params.serverUrl + "/variants",
+      params.serverUrl + "/allvarslist",
       {
         method: "GET",
         headers: headers
index 8de335e..d6cbda9 100644 (file)
@@ -35,7 +35,7 @@ export default {
   },
   created: function() {
     ajax(
-      "/variants",
+      "/allvarslist",
       "GET",
       {
         success: (res) => {
index 6e0e3af..28337e5 100644 (file)
@@ -4,7 +4,7 @@ let router = require("express").Router();
 const VariantModel = require("../models/Variant");
 const access = require("../utils/access");
 
-router.get('/variants', access.ajax, function(req, res) {
+router.get('/allvarslist', access.ajax, function(req, res) {
   VariantModel.getAll((err,variants) => {
     res.json(err || { variantArray:variants });
   });