Now formatted correctly with eslint
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
/* eslint-disable @typescript-eslint/member-ordering, @angular-eslint/prefer-inject, @typescript-eslint/no-invalid-void-type */
|
||||
import { Injectable, signal, computed } from '@angular/core';
|
||||
import {
|
||||
Injectable,
|
||||
signal,
|
||||
computed
|
||||
} from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Observable, of, throwError, forkJoin } from 'rxjs';
|
||||
import {
|
||||
Observable,
|
||||
of,
|
||||
throwError,
|
||||
forkJoin
|
||||
} from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { ServerInfo, JoinRequest, User } from '../models';
|
||||
import {
|
||||
ServerInfo,
|
||||
JoinRequest,
|
||||
User
|
||||
} from '../models';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
/**
|
||||
@@ -137,6 +150,7 @@ export class ServerDirectoryService {
|
||||
isActive: endpoint.id === endpointId
|
||||
}))
|
||||
);
|
||||
|
||||
this.saveEndpoints();
|
||||
}
|
||||
|
||||
@@ -148,9 +162,12 @@ export class ServerDirectoryService {
|
||||
): void {
|
||||
this._servers.update((endpoints) =>
|
||||
endpoints.map((endpoint) =>
|
||||
endpoint.id === endpointId ? { ...endpoint, status, latency } : endpoint
|
||||
endpoint.id === endpointId ? { ...endpoint,
|
||||
status,
|
||||
latency } : endpoint
|
||||
)
|
||||
);
|
||||
|
||||
this.saveEndpoints();
|
||||
}
|
||||
|
||||
@@ -541,7 +558,8 @@ export class ServerDirectoryService {
|
||||
|
||||
endpoints = endpoints.map((endpoint) => {
|
||||
if (endpoint.isDefault && /^https?:\/\/localhost:\d+$/.test(endpoint.url)) {
|
||||
return { ...endpoint, url: endpoint.url.replace(/^https?/, expectedProtocol) };
|
||||
return { ...endpoint,
|
||||
url: endpoint.url.replace(/^https?/, expectedProtocol) };
|
||||
}
|
||||
|
||||
return endpoint;
|
||||
@@ -556,7 +574,8 @@ export class ServerDirectoryService {
|
||||
|
||||
/** Create and persist the built-in default endpoint. */
|
||||
private initialiseDefaultEndpoint(): void {
|
||||
const defaultEndpoint: ServerEndpoint = { ...DEFAULT_ENDPOINT, id: uuidv4() };
|
||||
const defaultEndpoint: ServerEndpoint = { ...DEFAULT_ENDPOINT,
|
||||
id: uuidv4() };
|
||||
|
||||
this._servers.set([defaultEndpoint]);
|
||||
this.saveEndpoints();
|
||||
|
||||
Reference in New Issue
Block a user