From 5ec19973eb3d23046d874b097275857a58c23082 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 7 Jul 2021 20:45:06 +0200 Subject: api: Add endpoints for accessing project relations This change adds additional endpoints to the REST API to access the project relations, the portfolios and topologies that belong to a project. --- opendc-web/opendc-web-api/opendc/exts.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'opendc-web/opendc-web-api/opendc/exts.py') diff --git a/opendc-web/opendc-web-api/opendc/exts.py b/opendc-web/opendc-web-api/opendc/exts.py index 17dacd5e..3ee8babb 100644 --- a/opendc-web/opendc-web-api/opendc/exts.py +++ b/opendc-web/opendc-web-api/opendc/exts.py @@ -83,10 +83,9 @@ def requires_scope(required_scope): @wraps(f) def decorated(*args, **kwargs): if not has_scope(required_scope): - raise AuthError({ - "code": "Unauthorized", - "description": "You don't have access to this resource" - }, 403) + raise AuthError({"code": "Unauthorized", "description": "You don't have access to this resource"}, 403) return f(*args, **kwargs) + return decorated + return decorator -- cgit v1.2.3