diff options
Diffstat (limited to 'app/services/commands/login-command.js')
| -rw-r--r-- | app/services/commands/login-command.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/commands/login-command.js b/app/services/commands/login-command.js index 4b28c6d..9931f7a 100644 --- a/app/services/commands/login-command.js +++ b/app/services/commands/login-command.js @@ -1,7 +1,9 @@ import * as events from '../events'; +import ApplicationCommand from './application-command'; -export default class LoginCommand { +export default class LoginCommand extends ApplicationCommand { constructor(eventAggregator, api, applicationStorage) { + super(); this.eventAggregator = eventAggregator; this.api = api; this.applicationStorage = applicationStorage; @@ -11,7 +13,7 @@ export default class LoginCommand { eventAggregator.subscribe(events.LOGIN, this); } - notify(event) { + run(event) { let body = { username: event.username, password: event.password }; this.api.post('/sessions', body, this.onResponse.bind(this)); } |
