aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-11-13 22:34:48 +0000
committerAkshay <[email protected]>2024-11-13 22:34:48 +0000
commit6cd5a2cc9b22593fdadf0fc40fb9f31009e9f579 (patch)
tree8712f3bdc5fb3762b7d4ab19c06b74a97905b927
parentbbe0413ae1aad2516745f6f279225d2aea3555af (diff)
dbg
-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});