Make GET /flavors response structure consistent
Return a JSON object instead of a JSON array as the response representation. This is consistent with the response representation of GET /services. Further, it allows for the possibilty of adding a top-level "links" property in the future. Change-Id: I64fabfb5974eb928d84f937b125d4826cc86b78a
This commit is contained in:
parent
83cc0d6e28
commit
e8213e670d
|
@ -41,7 +41,9 @@ class FlavorsController(base.Controller):
|
|||
flavor_list = [
|
||||
flavor_response.Model(item, pecan.request) for item in result]
|
||||
|
||||
return flavor_list
|
||||
return {
|
||||
'flavors': flavor_list
|
||||
}
|
||||
|
||||
@pecan.expose('json')
|
||||
def get_one(self, flavor_id):
|
||||
|
|
Loading…
Reference in New Issue