From dc9338b991d0b3785857a6f26f60277f028a0121 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 29 Jan 2026 17:04:24 +0200 Subject: [PATCH] feat: add back toggle admin --- lnbits/core/views/user_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnbits/core/views/user_api.py b/lnbits/core/views/user_api.py index 3f125231f..7fd5b66ec 100644 --- a/lnbits/core/views/user_api.py +++ b/lnbits/core/views/user_api.py @@ -75,7 +75,7 @@ async def api_get_users( summary="Get user by Id", ) async def api_get_user(user_id: str) -> User: - user = await get_user(user_id) + user = await get_user(user_id, activated=None) if not user: raise HTTPException(HTTPStatus.NOT_FOUND, "User not found.") return user @@ -237,7 +237,7 @@ async def api_users_toggle_activated( if user_id == account.id: raise HTTPException( status_code=HTTPStatus.BAD_REQUEST, - detail="Users cannot deactivate themselves.", + detail="You cannot deactivate yourself.", ) if settings.is_admin_user(user_id):