diff --git a/app/assets/javascripts/admin/addon/components/admin-config-areas/api-keys-new.gjs b/app/assets/javascripts/admin/addon/components/admin-config-areas/api-keys-new.gjs index 923c97e5ee6..c7f2b8efcbd 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-areas/api-keys-new.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-areas/api-keys-new.gjs @@ -24,6 +24,8 @@ export default class AdminConfigAreasApiKeysNew extends Component { @tracked loadingScopes = false; @tracked scopes = null; + @tracked generatedApiKey = null; + userModes = [ { id: "all", name: i18n("admin.api.all_users") }, { id: "single", name: i18n("admin.api.single_user") }, @@ -93,8 +95,8 @@ export default class AdminConfigAreasApiKeysNew extends Component { } try { - await this.store.createRecord("api-key").save(payload); - this.router.transitionTo("adminApiKeys"); + const result = await this.store.createRecord("api-key").save(payload); + this.generatedApiKey = result.payload.key; } catch (error) { popupAjaxError(error); } @@ -148,169 +150,183 @@ export default class AdminConfigAreasApiKeysNew extends Component {