database_module #17
|
@ -41,8 +41,9 @@ class Database():
|
|||
self.cur.execute('SELECT * FROM feeds')
|
||||
return self.cur.fetchall()
|
||||
|
||||
def get_users_subscribes():
|
||||
pass
|
||||
def get_users_subscribes(self, user_id: int) -> list:
|
||||
self.cur.execute('SELECT * FROM feeds WHERE id IN (SELECT feed_id FROM subscribes WHERE user_id = ?)', (user_id,))
|
||||
return self.cur.fetchall()
|
||||
|
||||
def get_feed_items():
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue