add get_users_subscribes method
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
mitsuha_s 2022-05-28 22:47:19 +00:00
parent a07011ced7
commit f1d2ab3b9b

View file

@ -41,8 +41,9 @@ class Database():
self.cur.execute('SELECT * FROM feeds') self.cur.execute('SELECT * FROM feeds')
return self.cur.fetchall() return self.cur.fetchall()
def get_users_subscribes(): def get_users_subscribes(self, user_id: int) -> list:
pass 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(): def get_feed_items():
pass pass