From c49abee128226d27f886137e7f42f2f94b94819d Mon Sep 17 00:00:00 2001 From: ashley Date: Sat, 11 May 2024 02:37:03 +0000 Subject: [PATCH] redirect to the account page :3 --- src/libpoketube/init/pages-account.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libpoketube/init/pages-account.js b/src/libpoketube/init/pages-account.js index 253eb6cb..d5e1f7b4 100644 --- a/src/libpoketube/init/pages-account.js +++ b/src/libpoketube/init/pages-account.js @@ -70,17 +70,17 @@ app.get("/api/set-channel-subs", async function (req, res) { channelName: channelToSubName, avatar: avatar, // Store the avatar URL along with the subscription }); - res.json("user subbed"); + res.redirect("/account-create") } else if (!db.get(`user.${userid}.subs.${channelToSub}`)) { // If the user has 'subs' but not this particular subscription, add it db.set(`user.${userid}.subs.${channelToSub}`, { channelName: channelToSubName, avatar: avatar, // Store the avatar URL along with the subscription }); - res.json("user subbed"); + res.redirect("/account-create") } else { // If the user is already subscribed to this channel, send a message indicating so - res.json("user already subscribed"); + res.json("ur already subscribed"); } }); @@ -109,7 +109,7 @@ app.get("/my-acc", async function (req, res) { // Check if userid is more than 6 characters if (userid.length > 6) { - return res.status(400).json({ error: "IDs can be 6 characters max" }); + return res.status(400).json({ error: "IDs can be 6 characters max silly :3" }); } var userSubs = db.get(`user.${userid}.subs`);