From f1a93bffb5e7cc01a24ca7f4cfb21d08f45e613c Mon Sep 17 00:00:00 2001 From: aaeii Date: Sat, 8 Feb 2025 10:33:24 +0300 Subject: [PATCH] fix path --- server/routers/gamehub/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/gamehub/index.js b/server/routers/gamehub/index.js index 301a512..489588f 100644 --- a/server/routers/gamehub/index.js +++ b/server/routers/gamehub/index.js @@ -64,7 +64,7 @@ const fs = require("fs").promises; const path = require("path"); // Path to JSON file -const commentsFilePath = path.join(__dirname, "../json/gamepage/success.json"); +const commentsFilePath = path.join(__dirname, "./json/gamepage/success.json"); // Read JSON file async function readComments() { @@ -112,7 +112,7 @@ router.post("/update-like", async (req, res) => { // Путь к JSON-файлу с корзиной const cartFilePath = path.join( __dirname, - "../json/home-page-data/games-in-cart.json" + "./json/home-page-data/games-in-cart.json" ); // Функция для чтения JSON-файла -- 2.45.2