feat : Optimize user edit workflow and eliminate service restart delay

This commit is contained in:
Whispering Wind
2025-04-14 12:53:15 +03:30
committed by GitHub
parent 49b9580b60
commit 35d917b887
3 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,8 @@ async def edit_user_api(username: str, body: EditUserInputBody):
HTTPException: if an error occurs while editing the user.
"""
try:
cli_api.kick_user_by_name(username)
cli_api.traffic_status(display_output=False)
cli_api.edit_user(username, body.new_username, body.new_traffic_limit, body.new_expiration_days,
body.renew_password, body.renew_creation_date, body.blocked)
return DetailResponse(detail=f'User {username} has been edited.')