Skip to content

Commit

Permalink
Updated template logic to check if model task is successful.
Browse files Browse the repository at this point in the history
  • Loading branch information
chth0n1x committed Oct 12, 2023
1 parent 2cf4835 commit d50e5f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions app/settings/tokens/edit/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default class SettingsTokensEditController extends Controller {

@action
refresh() {
if (this.token && this.token.tokenValue) {
this.token.tokenValue = undefined;
this.token.save();
}
this.clearTokenValue();

// Send action to route
this.send('refreshRoute');
}

clearTokenValue() {
Expand Down
6 changes: 3 additions & 3 deletions app/settings/tokens/edit/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
{{else}}
<h4>{{t 'settings.tokens.editToken'}}</h4>

{{#if this.model.taskInstance.isError}}
{{this.model.taskInstance.error}}
{{else}}
{{#if this.model.taskInstance.isSuccessful}}
<Settings::Tokens::-Components::EditForm
@token={{this.token}}
/>
{{else}}
{{this.model.taskInstance.error}}
{{/if}}
{{/if}}
</div>

0 comments on commit d50e5f5

Please sign in to comment.