This is an Ember.js addon allowing you to easily implement non-CRUD actions for your Ember Data models.
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v14 or above
ember install @mainmatter/ember-api-actions
import Model from '@ember-data/model';
import { apiAction } from '@mainmatter/ember-api-actions';
class User extends Model {
async follow() {
return await apiAction(this, { method: 'PUT', path: 'follow' });
}
}
See the Contributing guide for details.
This project is licensed under the MIT License.