Skip to content

Instantly share code, notes, and snippets.

@hpaul
Created January 5, 2016 14:05
Show Gist options
  • Select an option

  • Save hpaul/953b57378bda8df98f2f to your computer and use it in GitHub Desktop.

Select an option

Save hpaul/953b57378bda8df98f2f to your computer and use it in GitHub Desktop.
@withAuthorization
class Users extends Endpoint {
static url = '/users';
static create(data, success, error) {
return this.post(data).then(
success, error
);
}
}
onCreate() {
dispatch( Users.create(data, Users.onCreated, someError) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment