Browse Source

Merge pull request #103 from slokhorst/patch-1

Clarify import error when no server files are found
pull/109/head
Per-Arne Andersen 3 years ago
committed by GitHub
parent
commit
7bd84f6e76
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      wg_dashboard_frontend/src/app/page/dashboard/add-server/add-server.component.ts

6
wg_dashboard_frontend/src/app/page/dashboard/add-server/add-server.component.ts

@ -148,7 +148,11 @@ export class AddServerComponent implements OnInit {
forkJoin(observables).subscribe(data => {
let server: any = data.filter((x: any) => !x.isClient);
if(server.length !== 1) {
if(server.length == 0) {
this.notify.notify("error", "No server files detected!")
return false;
}
if(server.length > 1) {
// TODO output error - should only be one server
this.notify.notify("error", "Detected multiple server files!")
return false;

Loading…
Cancel
Save