Merge "Use '_prepare_json_response' to serialize list response"

This commit is contained in:
Jenkins 2017-08-29 15:04:04 +00:00 committed by Gerrit Code Review
commit 9dd17acea2
1 changed files with 2 additions and 3 deletions

View File

@ -549,9 +549,8 @@ class ResponseSerializer(api_versioning.VersionedResource,
params['marker'] = af_list['next_marker']
next_query = urlparse.urlencode(params)
body['next'] = '/artifacts/%s?%s' % (type_name, next_query)
response.unicode_body = six.text_type(json.dumps(body,
ensure_ascii=False))
response.content_type = 'application/json'
self._prepare_json_response(response, body)
@supported_versions(min_ver='1.0')
def delete(self, response, result):