update @ Tue Mar 19 01:57:53 EET 2024

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Arija A. 2024-03-19 01:57:53 +02:00
parent d614f24de9
commit c2bf20c7b1
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A50D5B4B599AF8A2

View file

@ -858,7 +858,7 @@ created : {format_time(post["created"])}"""
@cmds.new @cmds.new
def ed(config: dict[str, typing.Any]) -> int: def ed(config: dict[str, typing.Any], major: bool = True) -> int:
"""edit posts""" """edit posts"""
fields: list[str] = select_multi(tuple(ecmds.commands.keys())) fields: list[str] = select_multi(tuple(ecmds.commands.keys()))
@ -882,11 +882,18 @@ def ed(config: dict[str, typing.Any]) -> int:
if code is not OK: if code is not OK:
return code return code
if major:
post["edited"] = datetime.datetime.utcnow().timestamp() post["edited"] = datetime.datetime.utcnow().timestamp()
return OK return OK
@cmds.new
def med(config: dict[str, typing.Any]) -> int:
"""minor edit posts"""
return ed(config=config, major=False) # type: ignore
@cmds.new @cmds.new
def rm(config: dict[str, typing.Any]) -> int: def rm(config: dict[str, typing.Any]) -> int:
"""remove posts""" """remove posts"""