chore: 🤖 redirect to index on save in create-without-read case

This commit is contained in:
Randall Morey committed 2021-09-08 14:20:04 -04:00
1 parent aa9694cae2
commit e389494a3b
1 file changed
+8 -4
@@ -60,10 +60,14 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route
adapterOptions.password = password;
}
await account.save({ adapterOptions });
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.accounts.account',
account
);
if (this.can.can('read model', account)) {
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.accounts.account',
account
);
} else {
await this.transitionTo('scopes.scope.auth-methods.auth-method.accounts');
}
this.refresh();
}