Skip to content

Commit

Permalink
Restored action for refreshToken.
Browse files Browse the repository at this point in the history
  • Loading branch information
chth0n1x committed Oct 13, 2023
1 parent 558c3a6 commit 1f33d87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions app/settings/tokens/edit/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import Toast from 'ember-toastr/services/toast';

import Token from 'ember-osf-web/models/token';
import Analytics from 'ember-osf-web/services/analytics';
import { task } from 'ember-concurrency';
import { waitFor } from '@ember/test-waiters';
import { action } from '@ember/object';

export default class SettingsTokensEditController extends Controller {
@service analytics!: Analytics;
Expand All @@ -21,8 +20,7 @@ export default class SettingsTokensEditController extends Controller {
@reads('model.taskInstance.value')
token?: Token;

@task
@waitFor
@action
async refreshToken() {
this.clearTokenValue();

Expand Down
2 changes: 1 addition & 1 deletion app/settings/tokens/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{t 'settings.tokens.createSuccess.instructions'}}
</p>
<Button
{{on 'click' (perform this.refreshToken)}}
{{on 'click' (action this.refreshToken)}}
>
{{t 'settings.tokens.createSuccess.editScopes'}}
</Button>
Expand Down

0 comments on commit 1f33d87

Please sign in to comment.