From: Benjamin Auder Date: Tue, 24 May 2022 19:49:34 +0000 (+0200) Subject: Rename route to get variants array to avoid conflicts with variants/ folder X-Git-Url: https://git.auder.net/variants/current/doc/scripts/getGraph_%22%20%20%20this.image%20%20%20%22.php?a=commitdiff_plain;h=7c165b3a63d7f18bc7046766a8a2090a492d3b18;p=vchess.git Rename route to get variants array to avoid conflicts with variants/ folder --- 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 }); });