From 22850ab2a2adab64fcd726f4d24825526d205294 Mon Sep 17 00:00:00 2001 From: Joaquin Date: Fri, 9 May 2025 10:55:02 -0700 Subject: [PATCH] fix/removed redundant code and fixed UI challenge 1 problem --- app.js | 10 ---------- src/views/partials/header.ejs | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index ff449a4..bc48457 100644 --- a/app.js +++ b/app.js @@ -154,16 +154,6 @@ app.post('/resetLink', async (req, res) => { res.redirect('/login'); }); -app.post('/api/location', async (req, res) => { - const { latitude, longitude } = req.body; - - const response = await fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&result_type=country&key=${process.env.geolocation_api}`); - - const data = await response.json(); - - res.json(data); -}); - // 404 handler - keep the actual notFound route please // REALLY DONT DELETE THIS app.get('/notFound', (req, res) => { diff --git a/src/views/partials/header.ejs b/src/views/partials/header.ejs index f48549f..90410ca 100644 --- a/src/views/partials/header.ejs +++ b/src/views/partials/header.ejs @@ -22,7 +22,7 @@

-

+