frontend redesign

This commit is contained in:
ngn
2025-01-07 00:13:11 +03:00
parent 337e56de78
commit fc11748e57
37 changed files with 1545 additions and 900 deletions

View File

@ -295,6 +295,15 @@ def __handle_command_with_file(log: Log, api: AdminAPI, cmd: str, file: str) ->
log.info("Logs has been saved")
commands = [
"add_service",
"del_service",
"check_services",
"add_news",
"del_news",
"logs"
]
if __name__ == "__main__":
log = Log()
@ -310,6 +319,18 @@ if __name__ == "__main__":
exit(1)
url = getenv(API_URL_ENV)
valid_cmd = False
for cmd in commands:
if argv[1] == cmd:
valid_cmd = True
break
if not valid_cmd:
log.error(
"Invalid command, run the script with no commands to list the available commands"
)
exit(1)
if url is None:
log.error(