chore: 🤖 redirect to index on save in create-without-read case
This commit is contained in:
2 files changed
+18
-8
No files matched your search
@@ -59,10 +59,16 @@ export default class ScopesScopeHostCatalogsHostCatalogHostSetsRoute extends Rou
|
||||
)
|
||||
async save(hostSet) {
|
||||
await hostSet.save();
|
||||
await this.transitionTo(
|
||||
'scopes.scope.host-catalogs.host-catalog.host-sets.host-set',
|
||||
hostSet
|
||||
);
|
||||
if (this.can.can('read model', hostSet)) {
|
||||
await this.transitionTo(
|
||||
'scopes.scope.host-catalogs.host-catalog.host-sets.host-set',
|
||||
hostSet
|
||||
);
|
||||
} else {
|
||||
await this.transitionTo(
|
||||
'scopes.scope.host-catalogs.host-catalog.host-sets'
|
||||
);
|
||||
}
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,14 @@ export default class ScopesScopeHostCatalogsHostCatalogHostsRoute extends Route
|
||||
)
|
||||
async save(host) {
|
||||
await host.save();
|
||||
await this.transitionTo(
|
||||
'scopes.scope.host-catalogs.host-catalog.hosts.host',
|
||||
host
|
||||
);
|
||||
if (this.can.can('read model', host)) {
|
||||
await this.transitionTo(
|
||||
'scopes.scope.host-catalogs.host-catalog.hosts.host',
|
||||
host
|
||||
);
|
||||
} else {
|
||||
await this.transitionTo('scopes.scope.host-catalogs.host-catalog.hosts');
|
||||
}
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user