From b355c18e280b71d41cdd5aa175ae71c970fa3f11 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 13 Nov 2024 13:57:59 +0100 Subject: [PATCH] update api.js --- routes/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.js b/routes/api.js index 2f862fb..185c534 100644 --- a/routes/api.js +++ b/routes/api.js @@ -305,7 +305,7 @@ router.get('/smile', (req, res) => { res.setHeader('Access-Control-Allow-Origin', 'http://localhost:5500'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type'); - const imagePath = path.join(window.location.href, '/storage/smile.jpg'); + const imagePath = path.join('/storage/smile.jpg'); fs.access(imagePath, fs.constants.F_OK, (err) => { if (err) { console.error('Image not found:', err);