From 7c165b3a63d7f18bc7046766a8a2090a492d3b18 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 24 May 2022 21:49:34 +0200
Subject: [PATCH] Rename route to get variants array to avoid conflicts with
 variants/ folder

---
 client/src/store.js           | 2 +-
 client/src/views/Variants.vue | 2 +-
 server/routes/variants.js     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/src/store.js b/client/src/store.js
index d57a7f55..f8b6b24e 100644
--- a/client/src/store.js
+++ b/client/src/store.js
@@ -19,7 +19,7 @@ export const store = {
       "X-Requested-With": "XMLHttpRequest"
     };
     fetch(
-      params.serverUrl + "/variants",
+      params.serverUrl + "/allvarslist",
       {
         method: "GET",
         headers: headers
diff --git a/client/src/views/Variants.vue b/client/src/views/Variants.vue
index 8de335e6..d6cbda93 100644
--- a/client/src/views/Variants.vue
+++ b/client/src/views/Variants.vue
@@ -35,7 +35,7 @@ export default {
   },
   created: function() {
     ajax(
-      "/variants",
+      "/allvarslist",
       "GET",
       {
         success: (res) => {
diff --git a/server/routes/variants.js b/server/routes/variants.js
index 6e0e3af1..28337e53 100644
--- a/server/routes/variants.js
+++ b/server/routes/variants.js
@@ -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 });
   });
-- 
2.44.0