From d50e5f5357eb2295e0c0bbb3a6152e599f25d3f5 Mon Sep 17 00:00:00 2001 From: Ashley Robinson Date: Thu, 12 Oct 2023 12:29:35 -0400 Subject: [PATCH] Updated template logic to check if model task is successful. --- app/settings/tokens/edit/controller.ts | 8 ++++---- app/settings/tokens/edit/template.hbs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/settings/tokens/edit/controller.ts b/app/settings/tokens/edit/controller.ts index 0c7faee6e37..2027d341f1e 100644 --- a/app/settings/tokens/edit/controller.ts +++ b/app/settings/tokens/edit/controller.ts @@ -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() { diff --git a/app/settings/tokens/edit/template.hbs b/app/settings/tokens/edit/template.hbs index d85971d44de..9d714989cc4 100644 --- a/app/settings/tokens/edit/template.hbs +++ b/app/settings/tokens/edit/template.hbs @@ -39,12 +39,12 @@ {{else}}

{{t 'settings.tokens.editToken'}}

- {{#if this.model.taskInstance.isError}} - {{this.model.taskInstance.error}} - {{else}} + {{#if this.model.taskInstance.isSuccessful}} + {{else}} + {{this.model.taskInstance.error}} {{/if}} {{/if}}