Open
Description
Add support for deserialize/serialize for custom actions:
store.defineMapper('school', {
endpoint: 'schools',
});
addAction('createTeacherReport', {
pathname: 'teachers',
method: 'POST'
})(store.getMapper('school'));
store.getMapper('school').createTeacherReport(1234, {
data: { someAttribute: 123 }
}).then(function (response) {
console.log('response', response.data);
});
See if in the then
there should be response or directly data
, in which case we can use raw: true
to get the response.