aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/routes/index.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/routes/index.js b/src/routes/index.js
index 7e68636..8e9c876 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -223,10 +223,8 @@ router.post("/unsubscribe", authenticateToken, async (req, res) => {
223 db.query( 223 db.query(
224 "DELETE FROM subscriptions WHERE user_id = $id AND subreddit = $subreddit", 224 "DELETE FROM subscriptions WHERE user_id = $id AND subreddit = $subreddit",
225 ).run({ id: user.id, subreddit }); 225 ).run({ id: user.id, subreddit });
226 console.log("done");
227 res.status(200).send("Unsubscribed successfully"); 226 res.status(200).send("Unsubscribed successfully");
228 } else { 227 } else {
229 console.log("not");
230 res.status(400).send("Subscription not found"); 228 res.status(400).send("Subscription not found");
231 } 229 }
232}); 230});