Commit a1c58766 authored by John Red Medrano's avatar John Red Medrano

modified APIGatewaySlugDetail added checking on slug to get list of archived

parent 61a20f61
......@@ -28,8 +28,13 @@ class APIGatewaySlugDetail(APIView):
def _response(self, request, **kwargs):
service = kwargs.get('service')
endpoint_url = kwargs.get('endpoint_url')
slug = kwargs.get('slug')
if slug == 'archived':
slug = 'archived'
else:
slug = 'slug'
api = Helper().get_endpoint(
request, service, f"{endpoint_url}/slug")
request, service, f"{endpoint_url}/{slug}")
return Response(api['data'],
status=api['status_code'],
headers=api['headers'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment