I am trying to use Flask-Restless with Ember.js, which is not so great. These are the GET responses that turn me off. For example, when I make a request GETfor /api/peopleexample, Ember.js expects:
{
people: [
{ id: 1, name: "Yehuda Katz" }
]
}
But Flask-Restless answers:
{
"total_pages": 1,
"objects": [
{ "id": 1, "name": "Yahuda Katz" }
],
"num_results": 1,
"page": 1
}
How do I modify Flask-Restless's answer to fit what Ember.js would like? I have a feeling that it might be in the postprocessor function, but I'm not sure how to implement it.
source
share