delete frontlist cache on hole pin or unpin

pull/83/head
Aevann 2022-12-23 00:39:59 +02:00
parent 31dd061b35
commit c89e757a94
1 changed files with 4 additions and 0 deletions

View File

@ -625,6 +625,8 @@ def hole_pin(v:User, pid):
)
g.db.add(ma)
cache.delete_memoized(frontlist)
return {"message": f"Post pinned to /h/{p.sub} successfully!"}
@app.post("/hole_unpin/<pid>")
@ -651,6 +653,8 @@ def hole_unpin(v:User, pid):
)
g.db.add(ma)
cache.delete_memoized(frontlist)
return {"message": f"Post unpinned from /h/{p.sub} successfully!"}