feat: Add pm

This commit is contained in:
2026-04-27 00:45:16 +02:00
parent bc2fa7de22
commit 11c2588e45
65 changed files with 3653 additions and 214 deletions

View File

@@ -4,10 +4,11 @@ import { HttpClient, HttpParams } from '@angular/common/http';
import {
Observable,
forkJoin,
merge,
of,
throwError
} from 'rxjs';
import { catchError, map } from 'rxjs/operators';
import { catchError, map, scan } from 'rxjs/operators';
import {
ChannelPermissionOverride,
type Channel,
@@ -299,9 +300,8 @@ export class ServerDirectoryApiService {
return this.searchSingleEndpoint(query, this.getApiBaseUrl(), this.endpointState.activeServer());
}
return forkJoin(onlineEndpoints.map((endpoint) => this.searchSingleEndpoint(query, `${endpoint.url}/api`, endpoint))).pipe(
map((resultArrays) => resultArrays.flat()),
map((servers) => this.deduplicateById(servers))
return merge(...onlineEndpoints.map((endpoint) => this.searchSingleEndpoint(query, `${endpoint.url}/api`, endpoint))).pipe(
scan((servers, endpointServers) => this.deduplicateById([...servers, ...endpointServers]), [] as ServerInfo[])
);
}