mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
24 lines
592 B
TypeScript
24 lines
592 B
TypeScript
import { API_BASE_URL } from "@/helpers/common.helper";
|
|
// services
|
|
import { APIService } from "@/services/api.service";
|
|
|
|
export type TFeatureFlagsResponse = {
|
|
values: {
|
|
[featureFlag: string]: boolean;
|
|
};
|
|
};
|
|
|
|
export class FeatureFlagService extends APIService {
|
|
constructor() {
|
|
super(API_BASE_URL);
|
|
}
|
|
|
|
async getFeatureFlags(workspaceSlug: string): Promise<TFeatureFlagsResponse> {
|
|
return this.get(`/api/payments/workspaces/${workspaceSlug}/flags/`)
|
|
.then((response) => response?.data)
|
|
.catch((error) => {
|
|
throw error?.response?.data;
|
|
});
|
|
}
|
|
}
|