1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-19 13:19:41 +02:00

feat: Consolidate Admin User APIs (#5050)

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
Michael Genson 2025-06-30 05:13:42 -05:00 committed by GitHub
parent 31f90c79c0
commit 47eb1ebbb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 53 deletions

View file

@ -24,7 +24,7 @@ def test_api_token_private(api_client: TestClient, admin_token):
response = api_client.post(api_routes.users_api_tokens, json={"name": "Test API Token"}, headers=admin_token)
assert response.status_code == 201
response = api_client.get(api_routes.users, headers=admin_token, params={"perPage": -1})
response = api_client.get(api_routes.admin_users, headers=admin_token, params={"perPage": -1})
assert response.status_code == 200
for user in response.json()["items"]:
for user_token in user["tokens"] or []:
@ -39,7 +39,7 @@ def test_api_token_private(api_client: TestClient, admin_token):
def test_use_token(api_client: TestClient, long_live_token):
response = api_client.get(api_routes.users, headers=long_live_token)
response = api_client.get(api_routes.admin_users, headers=long_live_token)
assert response.status_code == 200