fix API Gateway:create_usage_plan_key return wrong status code (#3134)

This commit is contained in:
cm-iwata 2020-07-15 22:01:03 +09:00 committed by GitHub
commit 419f3fba5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -528,13 +528,11 @@ class APIGatewayResponse(BaseResponse):
error.message, error.error_type
),
)
return 201, {}, json.dumps(usage_plan_response)
elif self.method == "GET":
usage_plans_response = self.backend.get_usage_plan_keys(usage_plan_id)
return 200, {}, json.dumps({"item": usage_plans_response})
return 200, {}, json.dumps(usage_plan_response)
def usage_plan_key_individual(self, request, full_url, headers):
self.setup_class(request, full_url, headers)