Remove dashboard from dashboard URL

It’s weird that `/services/<service_id>` returns `404`. The home page
for every service is the dashboard – should be possible to get there
from any other page just by stemming the URL.

Also makes it consistent with organisations, which will have
`/organisations/<org_id>`.
This commit is contained in:
Chris Hill-Scott
2018-02-14 10:38:00 +00:00
parent 0f20cfe8bc
commit 95482363aa
3 changed files with 21 additions and 1 deletions

View File

@@ -51,6 +51,13 @@ def temp_service_history(service_id):
@main.route("/services/<service_id>/dashboard")
@login_required
@user_has_permissions('view_activity', admin_override=True)
def old_service_dashboard(service_id):
return redirect(url_for('.service_dashboard', service_id=service_id))
@main.route("/services/<service_id>")
@login_required
@user_has_permissions('view_activity', admin_override=True)
def service_dashboard(service_id):
if session.get('invited_user'):