1
0
Fork 0
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:
Cadence Ember 2022-01-10 14:18:45 +13:00
parent 15e3f06ad6
commit 109dcd22de
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
12 changed files with 167 additions and 22 deletions

View file

@ -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,