fix API Gateway:create_api_key return wrong status code (#3136)

This commit is contained in:
cm-iwata 2020-07-15 20:21:11 +09:00 committed by GitHub
commit 4e4ce5f9f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -454,11 +454,10 @@ class APIGatewayResponse(BaseResponse):
error.message, error.error_type
),
)
return 201, {}, json.dumps(apikey_response)
elif self.method == "GET":
apikeys_response = self.backend.get_apikeys()
return 200, {}, json.dumps({"item": apikeys_response})
return 200, {}, json.dumps(apikey_response)
def apikey_individual(self, request, full_url, headers):
self.setup_class(request, full_url, headers)