mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 00:34:41 -05:00
redirect to the account page :3
This commit is contained in:
parent
d7ef10b65e
commit
c49abee128
1 changed files with 4 additions and 4 deletions
|
@ -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`);
|
||||
|
|
Loading…
Reference in a new issue