diff --git a/app.py b/app.py index ba63391..e638851 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ import json app = Flask(__name__) # Load the data from the JSON file -with open('static/data.json') as f: +with open('static/json/data.json') as f: guns = json.load(f) diff --git a/static/filterWeapons.js b/static/filterWeapons.js index 19340c9..25bc225 100644 --- a/static/filterWeapons.js +++ b/static/filterWeapons.js @@ -3,7 +3,7 @@ let weapons = []; // This will be populated by the fetched JSON data // Function to fetch weapons data from JSON function fetchWeaponsData() { - fetch('static/data.json') // Adjust the path to the actual location of your JSON file + fetch('static/json/data.json') // Adjust the path to the actual location of your JSON file .then(response => response.json()) .then(data => { weapons = data; // Store the fetched data in the global 'weapons' variable @@ -57,7 +57,7 @@ function updateWeaponStats(weapon) { // Function to fetch and populate modifiers from the JSON file function fetchModifiers() { - fetch('static/modifiers.json') // Adjust the path to your JSON file + fetch('static/json/modifiers.json') // Adjust the path to your JSON file .then(response => response.json()) .then(data => { populateModifiers(data); diff --git a/static/data.json b/static/json/data.json similarity index 100% rename from static/data.json rename to static/json/data.json diff --git a/static/modifiers.json b/static/json/modifiers.json similarity index 100% rename from static/modifiers.json rename to static/json/modifiers.json diff --git a/static/operative.json b/static/json/operative.json similarity index 100% rename from static/operative.json rename to static/json/operative.json