Fixed server loading in web
All checks were successful
Deploy prod on push / on-push-deploy_sh-edraft (push) Successful in 5m6s

This commit is contained in:
2023-11-07 00:06:17 +01:00
parent 1b0ba01258
commit 7358b67072
4 changed files with 48 additions and 4 deletions

View File

@@ -29,6 +29,18 @@ export class DataService {
) {
}
public getServerIdFromRoute(route: ActivatedRoute): Promise<number> {
return new Promise((resolve, reject) => {
this.spinner.showSpinner();
if (!route.snapshot.params["serverId"] || route.snapshot.params["serverId"] == "undefined") {
this.spinner.hideSpinner();
this.router.navigate(["/dashboard"]);
reject();
}
resolve(route.snapshot.params["serverId"]);
});
}
public getServerFromRoute(route: ActivatedRoute): Promise<Server> {
return new Promise((resolve, reject) => {
this.spinner.showSpinner();
@@ -50,7 +62,6 @@ export class DataService {
resolve(server);
});
});
}
public query<T>(query: string, variables?: Variables, f?: Function): Observable<T> {