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

This commit is contained in:
Randall Morey committed 2021-09-08 14:31:16 -04:00
1 parent e389494a3b
commit 8f11765b96
1 file changed
+10 -4
@@ -55,10 +55,16 @@ export default class ScopesScopeCredentialStoresCredentialStoreCredentialLibrari
)
async save(credentialLibrary) {
await credentialLibrary.save();
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries.credential-library',
credentialLibrary
);
if (this.can.can('read model', credentialLibrary)) {
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries.credential-library',
credentialLibrary
);
} else {
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries'
);
}
this.refresh();
}