forked from rDrama/rDrama
master
parent
8f761aed3b
commit
04a8ecd81a
|
@ -502,7 +502,7 @@ def api_comment(v):
|
||||||
c=get_comment(c.id, v=v)
|
c=get_comment(c.id, v=v)
|
||||||
|
|
||||||
cache.delete_memoized(comment_idlist)
|
cache.delete_memoized(comment_idlist)
|
||||||
cache.delete_memoized(User.commentlisting, v=v)
|
cache.delete_memoized(User.commentlisting, v)
|
||||||
|
|
||||||
v.comment_count = v.comments.filter(Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count()
|
v.comment_count = v.comments.filter(Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count()
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
@ -721,7 +721,7 @@ def delete_comment(cid, v):
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
cache.delete_memoized(comment_idlist)
|
cache.delete_memoized(comment_idlist)
|
||||||
cache.delete_memoized(User.commentlisting, v=v)
|
cache.delete_memoized(User.commentlisting, v)
|
||||||
|
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
||||||
|
@ -743,7 +743,7 @@ def undelete_comment(cid, v):
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
cache.delete_memoized(comment_idlist)
|
cache.delete_memoized(comment_idlist)
|
||||||
cache.delete_memoized(User.commentlisting, v=v)
|
cache.delete_memoized(User.commentlisting, v)
|
||||||
|
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
||||||
|
|
|
@ -926,7 +926,7 @@ def submit_post(v):
|
||||||
v.post_count = v.submissions.filter_by(is_banned=False, deleted_utc=0).count()
|
v.post_count = v.submissions.filter_by(is_banned=False, deleted_utc=0).count()
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
cache.delete_memoized(User.userpagelisting, v=v)
|
cache.delete_memoized(User.userpagelisting, v)
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
if "[changelog]" in new_post.title: cache.delete_memoized(changeloglist)
|
if "[changelog]" in new_post.title: cache.delete_memoized(changeloglist)
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ def changelogsub(v):
|
||||||
v.changelogsub = not v.changelogsub
|
v.changelogsub = not v.changelogsub
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
cache.delete_memoized(frontlist, v=v)
|
cache.delete_memoized(frontlist, v)
|
||||||
|
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ def settings_block_user(v):
|
||||||
|
|
||||||
if v.admin_level == 1: return {"message": f"@{user.username} banned!"}
|
if v.admin_level == 1: return {"message": f"@{user.username} banned!"}
|
||||||
|
|
||||||
cache.delete_memoized(frontlist, v=v)
|
cache.delete_memoized(frontlist, v)
|
||||||
|
|
||||||
return {"message": f"@{user.username} blocked."}
|
return {"message": f"@{user.username} blocked."}
|
||||||
|
|
||||||
|
@ -494,7 +494,7 @@ def settings_unblock_user(v):
|
||||||
|
|
||||||
if v.admin_level == 1: return {"message": f"@{user.username} unbanned!"}
|
if v.admin_level == 1: return {"message": f"@{user.username} unbanned!"}
|
||||||
|
|
||||||
cache.delete_memoized(frontlist, v=v)
|
cache.delete_memoized(frontlist, v)
|
||||||
|
|
||||||
return {"message": f"@{user.username} unblocked."}
|
return {"message": f"@{user.username} unblocked."}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue