From 1412768d4f9a18f9bf4b3c5cc3324dc938363773 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Fri, 15 Nov 2024 12:26:16 -0700 Subject: [PATCH] BWuh --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index bd63da1..a32ef0d 100644 --- a/index.js +++ b/index.js @@ -125,6 +125,7 @@ app.patch('/:shortUrl', (req, res) => { if (!req.body.url) { return res.status(400).json({ error: 'Please provide a URL' }); } + const url = req.body.url; const shortUrl = req.params.shortUrl; db.get('SELECT * FROM urls WHERE shortUrl = ?', [shortUrl], (err, row) => { if (err) {