Reputation: 55
My Backend is with Sails.js , I install React-admin and this Package ra-data-json-sails this is my Code [https://i.sstatic.net/DwUmD.jpg]
and i saw this error
https://i.sstatic.net/8G6zs.jpg
Plz Help me
Thanks
Upvotes: 0
Views: 542
Reputation: 7355
In addition to adding the X-Total-Count header in your CORS configuration, you must also return it in the API response to GET_LIST.
This example implementation should help you:
async.parallel({
data: getData,
count: getTotalCount
}, function (err, results) {
res.set('X-Total-Count', results.count);
res.ok(results.data);
});
More details at https://gist.github.com/aantipov/8ee3b7607ab9e01e4ede
Upvotes: 1