subscripe me to posts automatically

pull/216/head
Aevann 2023-10-22 21:01:04 +03:00
parent 26f442a6d8
commit dd555e42cf
1 changed files with 5 additions and 0 deletions

View File

@ -173,6 +173,11 @@ def _create_post(title, body, pin_hours):
)
g.db.add(p)
if AEVANN_ID:
g.db.flush()
new_sub = Subscription(user_id=AEVANN_ID, post_id=p.id)
g.db.add(new_sub)
cache.delete_memoized(frontlist)
def _delete_all_posts():