Implement flmt updating as content is updated
This commit is contained in:
parent
04169c6942
commit
0c65406743
1 changed files with 6 additions and 0 deletions
|
@ -170,6 +170,12 @@ def update_post(ctx: rest.Context, params: Dict[str, str]) -> rest.Response:
|
|||
if ctx.has_file("thumbnail"):
|
||||
auth.verify_privilege(ctx.user, "posts:edit:thumbnail")
|
||||
posts.update_post_thumbnail(post, ctx.get_file("thumbnail"))
|
||||
if ctx.has_param("fileLastModifiedTime"):
|
||||
posts.update_post_file_last_modified_time(
|
||||
post, ctx.get_param_as_int("fileLastModifiedTime")
|
||||
)
|
||||
else:
|
||||
post.file_last_modified_time = datetime.utcnow()
|
||||
post.last_edit_time = datetime.utcnow()
|
||||
ctx.session.flush()
|
||||
snapshots.modify(post, ctx.user)
|
||||
|
|
Reference in a new issue