jeudi 25 octobre 2018

customizing adapters for ember api actions

I am referring ember api actions: https://github.com/mike-north/ember-api-actions

Wanted to ask, does someone know if i have an adapter for the model itself but I want to customize the adapter only for one of the member action defined, is it possible to do so?

For example, if my model looks like this:

export default DS.Model.extend({
  userName: attr('string');
  withdrawMoney: memberAction({path: 'actions/withdraw', type: 'POST'})
})

Now adapter for my user model has some headers set. But what I want to do now is if I invoke my member action, then I want to add additional headers. Is it possible to do so without impacting headers globally?




Aucun commentaire:

Enregistrer un commentaire