changed directory for json files

This commit is contained in:
IM23a-bachmannj2
2024-09-16 11:24:21 +02:00
parent 7748432913
commit b0d74ddf6a
5 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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);