Fix API response code mismatch
Response mismatch between http reponse and json payload for configdocs replace Change-Id: I979cd31e26660149d0121d65298d106afbb24008
This commit is contained in:
parent
58e2949cdc
commit
8b43d75ecf
|
@ -86,9 +86,11 @@ class ConfigDocsResource(BaseResource):
|
||||||
document_data=document_data,
|
document_data=document_data,
|
||||||
buffer_mode_param=buffer_mode)
|
buffer_mode_param=buffer_mode)
|
||||||
|
|
||||||
|
resp.status = falcon.HTTP_201
|
||||||
|
if validations and validations['status'] == 'Success':
|
||||||
|
validations['code'] = resp.status
|
||||||
resp.location = '/api/v1.0/configdocs/{}'.format(collection_id)
|
resp.location = '/api/v1.0/configdocs/{}'.format(collection_id)
|
||||||
resp.body = self.to_json(validations)
|
resp.body = self.to_json(validations)
|
||||||
resp.status = falcon.HTTP_201
|
|
||||||
|
|
||||||
@policy.ApiEnforcer('workflow_orchestrator:get_configdocs')
|
@policy.ApiEnforcer('workflow_orchestrator:get_configdocs')
|
||||||
def on_get(self, req, resp, collection_id):
|
def on_get(self, req, resp, collection_id):
|
||||||
|
|
Loading…
Reference in New Issue