Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions services_backend/routes/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,17 @@ def get_buttons(
"id": button.id,
"icon": button.icon,
"name": button.name,
"link": button.link,
"order": button.order,
"type": button.type,
"link": button.link if view == ButtonView.ACTIVE else None,
"view": view.value,
"required_scopes": button.required_scopes,
"optional_scopes": button.optional_scopes,
}
if view == ButtonView.ACTIVE:
to_add["scopes"] = list(scopes)
result["buttons"].append(to_add)

return result


Expand Down Expand Up @@ -177,9 +178,9 @@ def get_button(
"id": button.id,
"icon": button.icon,
"name": button.name,
"link": button.link,
"order": button.order,
"type": button.type,
"link": button.link if view == ButtonView.ACTIVE else None,
"view": view.value,
"required_scopes": button.required_scopes,
"optional_scopes": button.optional_scopes,
Expand Down Expand Up @@ -305,7 +306,7 @@ def get_service(
"id": button.id,
"icon": button.icon,
"name": button.name,
"link": button.link,
"link": button.link if view == ButtonView.ACTIVE else None,
"order": button.order,
"type": button.type,
"view": view.value,
Expand Down
2 changes: 1 addition & 1 deletion services_backend/routes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_categories(
"id": button.id,
"icon": button.icon,
"name": button.name,
"link": button.link,
"link": (button.link if view == ButtonView.ACTIVE else None),
"order": button.order,
"type": button.type,
"view": view.value,
Expand Down