re-add subscriptions
This commit is contained in:
@ -56,6 +56,18 @@ class Users(Model):
|
||||
WHERE users.id = ?"""
|
||||
return db.fetch_one(q, self.id)
|
||||
|
||||
def get_all_subscriptions(self):
|
||||
q = """
|
||||
SELECT threads.title AS thread_title, threads.slug AS thread_slug
|
||||
FROM
|
||||
threads
|
||||
JOIN
|
||||
subscriptions ON subscriptions.thread_id = threads.id
|
||||
WHERE
|
||||
subscriptions.user_id = ?"""
|
||||
return db.query(q, self.id)
|
||||
|
||||
|
||||
class Topics(Model):
|
||||
table = "topics"
|
||||
|
||||
|
Reference in New Issue
Block a user