mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-05-26 12:32:25 +00:00
Rework subscribing to deleted channels
This commit is contained in:
parent
15e3f06ad6
commit
109dcd22de
12 changed files with 167 additions and 22 deletions
|
|
@ -26,7 +26,6 @@ module.exports = [
|
|||
await fetchChannel(ucid, settings.instance)
|
||||
db.prepare(
|
||||
"INSERT INTO Subscriptions (token, ucid) VALUES (?, ?)"
|
||||
+ " ON CONFLICT (token, ucid) DO UPDATE SET channel_missing = 0"
|
||||
).run(token, ucid)
|
||||
} else {
|
||||
db.prepare("DELETE FROM Subscriptions WHERE token = ? AND ucid = ?").run(token, ucid)
|
||||
|
|
@ -41,7 +40,6 @@ module.exports = [
|
|||
}),
|
||||
content: "Success, redirecting..."
|
||||
}
|
||||
return redirect(params.get("referrer"), 303)
|
||||
} else {
|
||||
return {
|
||||
statusCode: 200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue