mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
Rename top-level routes for resource lists
This commit is contained in:
parent
09e18897b6
commit
6300a914e4
|
@ -13,7 +13,7 @@ mailing_lists = Blueprint("mailing_lists", __name__)
|
|||
|
||||
@mailing_lists.route("/<owner>/<project_name>/lists")
|
||||
@loginrequired
|
||||
def list_GET(owner, project_name):
|
||||
def lists_GET(owner, project_name):
|
||||
owner, project = get_project(owner, project_name, ProjectAccess.read)
|
||||
mailing_lists = (MailingList.query
|
||||
.filter(MailingList.project_id == project.id)
|
||||
|
|
|
@ -13,7 +13,7 @@ sources = Blueprint("sources", __name__)
|
|||
|
||||
@sources.route("/<owner>/<project_name>/sources")
|
||||
@loginrequired
|
||||
def list_GET(owner, project_name):
|
||||
def sources_GET(owner, project_name):
|
||||
owner, project = get_project(owner, project_name, ProjectAccess.read)
|
||||
sources = (SourceRepo.query
|
||||
.filter(SourceRepo.project_id == project.id)
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
</li>
|
||||
{% if any(project.source_repos) %}
|
||||
<li class="nav-item">
|
||||
{{link(url_for("sources.list_GET",
|
||||
{{link(url_for("sources.sources_GET",
|
||||
owner=owner.canonical_name,
|
||||
project_name=project.name), "sources")}}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if any(project.mailing_lists) %}
|
||||
<li class="nav-item">
|
||||
{{link(url_for("mailing_lists.list_GET",
|
||||
{{link(url_for("mailing_lists.lists_GET",
|
||||
owner=owner.canonical_name,
|
||||
project_name=project.name), "mailing lists")}}
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue