Skip to content

Commit

Permalink
Merge pull request #1608 from sumesh-aot/prod_settings_url
Browse files Browse the repository at this point in the history
Fixing product settings URL
  • Loading branch information
sumesh-aot authored May 12, 2021
2 parents ce12168 + 24a8638 commit d63420e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions auth-api/src/auth_api/services/user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def fetch_user_settings(user_id):
url_origin = current_app.config.get('WEB_APP_URL')
for org in all_orgs:
all_settings.append(
UserSettingsModel(org.id, org.name, url_origin, '/account/' + str(org.id) + '/settings', 'ACCOUNT',
org.type_code, org.status_code, '/account/' + str(org.id) + '/product-settings'))
UserSettingsModel(org.id, org.name, url_origin,
'/account/' + str(org.id) + '/settings',
'ACCOUNT', org.type_code, org.status_code,
'/account/' + str(org.id) + '/settings/product-settings'))

all_settings.append(UserSettingsModel(user_id, 'USER PROFILE', url_origin, '/userprofile', 'USER_PROFILE'))
all_settings.append(
Expand Down
2 changes: 1 addition & 1 deletion auth-api/tests/unit/api/test_user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ def test_get_user_settings(client, jwt, session, keycloak_mock): # pylint:disab
assert account['accountType'] == 'BASIC'
assert rv.status_code == http_status.HTTP_200_OK
assert schema_utils.validate(item_list, 'user_settings_response')[0]
assert account['productSettings'] == f'/account/{account["id"]}/product-settings'
assert account['productSettings'] == f'/account/{account["id"]}/settings/product-settings'

0 comments on commit d63420e

Please sign in to comment.