Skip to content

Commit

Permalink
Return Endpoint from EndpointGroup.endpoint wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Aug 15, 2024
1 parent 2a653e2 commit 027c01f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions superdesk/core/web/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ def endpoint(
"""

def fdec(func: EndpointFunction):
self.endpoints.append(
Endpoint(
f"{self.url_prefix}/{url}" if self.url_prefix else url,
func,
methods=methods,
name=name,
)
endpoint_func = Endpoint(
f"{self.url_prefix}/{url}" if self.url_prefix else url,
func,
methods=methods,
name=name,
)
self.endpoints.append(endpoint_func)
return endpoint_func

return fdec

Expand Down

0 comments on commit 027c01f

Please sign in to comment.