Skip to content

Commit

Permalink
[feature] Add api cliear cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Zarubin committed Oct 20, 2024
1 parent e23e57c commit c6a0d2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aurora_cli/src/api/group_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@
{TextCommand.command_app_info()}
/app/info
{TextArgument.argument_clear_cache()}
/app/clear
{TextCommand.command_app_versions()}
/app/versions
Expand Down
7 changes: 6 additions & 1 deletion aurora_cli/src/api/routes/routes_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
app_auth_password_common
)
from aurora_cli.src.base.models.psdk_model import PsdkModel
from aurora_cli.src.base.utils.output import echo_stdout
from aurora_cli.src.base.texts.info import TextInfo
from aurora_cli.src.base.utils.cache_func import cache_func_clear
from aurora_cli.src.base.utils.output import echo_stdout, OutResult
from aurora_cli.src.base.utils.route import get_route_root, get_arg_str, get_arg_str_optional


def search_route_app(route: str) -> bool:
root = get_route_root(route)
if root == '/app/info':
echo_stdout(app_info_common())
elif root == '/app/clear':
cache_func_clear()
echo_stdout(OutResult(TextInfo.cache_clear()))
elif root == '/app/versions':
echo_stdout(app_versions_common())
elif root == '/app/auth/check':
Expand Down

0 comments on commit c6a0d2f

Please sign in to comment.