1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

Add subscriptions page

This commit is contained in:
Cadence Ember 2020-08-31 03:14:05 +12:00
parent f24e1bb39c
commit 59a7489545
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
11 changed files with 159 additions and 6 deletions

View file

@ -1,6 +1,5 @@
const crypto = require("crypto")
const {parse: parseCookie} = require("cookie")
const constants = require("./constants")
const db = require("./db")
@ -26,7 +25,7 @@ class User {
getSubscriptions() {
if (this.token) {
return db.prepare("SELECT ucid FROM Subscriptions WHERE token = ?").pluck().all(ucid)
return db.prepare("SELECT ucid FROM Subscriptions WHERE token = ?").pluck().all(this.token)
} else {
return []
}