Add an endpoint for listing the links of a project

This commit is contained in:
Julien Duponchelle committed 2016-05-17 16:10:47 +02:00
1 parent ce0d715895
commit b07dcf552c
2 files changed
+43

No files matched your search

@@ -31,6 +31,21 @@ class LinkHandler:
API entry point for Link
"""
@Route.get(
r"/projects/{project_id}/links",
parameters={
"project_id": "Project UUID"
},
status_codes={
200: "List of links returned",
},
description="List links of a project")
def list_links(request, response):
controller = Controller.instance()
project = controller.get_project(request.match_info["project_id"])
response.json([v for v in project.links.values()])
@Route.post(
r"/projects/{project_id}/links",
parameters={