Skip to content

Commit

Permalink
update login to use users path
Browse files Browse the repository at this point in the history
  • Loading branch information
luciipak committed Sep 30, 2023
1 parent 2104e7b commit 0a358e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Changelog for Mantarray Desktop App
Changed:
^^^^^^^^
- Update upload_type in ``/uploads`` request
- Remove service in ``/login`` request
- Update service in ``/login`` request

Fixed:
^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion controller/src/mantarray_desktop_app/utils/web_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ def get_cloud_api_tokens(
password: current user's password.
"""
response = requests.post(
f"https://{CLOUD_API_ENDPOINT}/users/login",
f"https://{CLOUD_API_ENDPOINT}/users/login/user",
json={
"customer_id": customer_id,
"username": user_name,
"password": password,
"service": "mantarray",
"client_type": f"mantarray:{CURRENT_SOFTWARE_VERSION}",
},
)
Expand Down
4 changes: 2 additions & 2 deletions controller/tests/utils/test_web_api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def test_get_cloud_api_tokens__return_tokens_if_login_successful(mocker):
assert tokens == expected_tokens

mocked_post.assert_called_once_with(
f"https://{CLOUD_API_ENDPOINT}/users/login",
json={**test_creds, "client_type": f"mantarray:{CURRENT_SOFTWARE_VERSION}"},
f"https://{CLOUD_API_ENDPOINT}/users/login/user",
json={**test_creds, "service": "mantarray", "client_type": f"mantarray:{CURRENT_SOFTWARE_VERSION}"},
)


Expand Down

0 comments on commit 0a358e5

Please sign in to comment.