mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[PM-13790] Remove RefactorOrganizationUserApi feature flag (#11662)
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ListResponse } from "@bitwarden/common/models/response/list.response";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
|
||||
import { OrganizationUserApiService } from "../abstractions";
|
||||
import {
|
||||
@@ -27,10 +23,7 @@ import {
|
||||
} from "../models/responses";
|
||||
|
||||
export class DefaultOrganizationUserApiService implements OrganizationUserApiService {
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private configService: ConfigService,
|
||||
) {}
|
||||
constructor(private apiService: ApiService) {}
|
||||
|
||||
async getOrganizationUser(
|
||||
organizationId: string,
|
||||
@@ -95,14 +88,6 @@ export class DefaultOrganizationUserApiService implements OrganizationUserApiSer
|
||||
async getAllMiniUserDetails(
|
||||
organizationId: string,
|
||||
): Promise<ListResponse<OrganizationUserUserMiniResponse>> {
|
||||
const apiEnabled = await firstValueFrom(
|
||||
this.configService.getFeatureFlag$(FeatureFlag.Pm3478RefactorOrganizationUserApi),
|
||||
);
|
||||
if (!apiEnabled) {
|
||||
// Keep using the old api until this feature flag is enabled
|
||||
return this.getAllUsers(organizationId);
|
||||
}
|
||||
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
`/organizations/${organizationId}/users/mini-details`,
|
||||
|
||||
Reference in New Issue
Block a user