Browse Source

Clarify import error when no server files are found

Previously, it would report "multiple server files" if 0 were found.
pull/103/head
Sebastiaan Lokhorst 3 years ago
committed by GitHub
parent
commit
df080f8f5a
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

@ -147,7 +147,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