AAE-35340 Replace deprecated toPromise() usages with firstValueFrom / lastValueFrom (#11161)

This commit is contained in:
Amedeo Lepore
2025-09-03 08:37:13 -04:00
committed by GitHub
parent 93c872b65d
commit 51c55674b4
27 changed files with 178 additions and 191 deletions
@@ -31,7 +31,7 @@ import {
} from '@angular/core';
import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
import { animate, state, style, transition, trigger } from '@angular/animations';
import { BehaviorSubject, Observable } from 'rxjs';
import { BehaviorSubject, firstValueFrom, Observable } from 'rxjs';
import { debounceTime, distinctUntilChanged, filter, mergeMap, switchMap, tap } from 'rxjs/operators';
import { ComponentSelectionMode } from '../../types';
import { IdentityGroupModel } from '../models/identity-group.model';
@@ -248,7 +248,7 @@ export class GroupCloudComponent implements OnInit, OnChanges {
}
private async searchGroup(name: string): Promise<IdentityGroupModel> {
return (await this.identityGroupService.search(name).toPromise())[0];
return (await firstValueFrom(this.identityGroupService.search(name)))[0];
}
private getPreselectedGroups(): IdentityGroupModel[] {