Skip to content

Commit

Permalink
[Gitar] Updating TypeScript files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitar committed Oct 12, 2024
1 parent 84a057d commit 1637cc2
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 20 deletions.
1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export type UiFlags = {
maintenanceMode?: boolean;
messageBanner?: Variant;
banner?: Variant;
featuresExportImport?: boolean;
caseInsensitiveInOperators?: boolean;
notifications?: boolean;
personalAccessTokensKillSwitch?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
importTogglesValidateSchema,
} from '../../openapi';
import type { IAuthRequest } from '../../routes/unleash-types';
import { extractUsername } from '../../util';
import { BadDataError, InvalidOperationError } from '../../error';
import ApiUser from '../../types/api-user';

Expand Down Expand Up @@ -118,7 +117,6 @@ class ExportImportController extends Controller {
): Promise<void> {
this.verifyExportImportEnabled();
const query = req.body;
const userName = extractUsername(req);

const data = await this.exportService.export(query, req.audit);

Expand Down Expand Up @@ -173,11 +171,7 @@ class ExportImportController extends Controller {
}

private verifyExportImportEnabled() {
if (!this.config.flagResolver.isEnabled('featuresExportImport')) {
throw new InvalidOperationError(
'Feature export/import is not enabled',
);
}
throw new InvalidOperationError('Feature export/import is not enabled');
}
}
export default ExportImportController;
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ beforeAll(async () => {
db.stores,
{
experimental: {
flags: {
featuresExportImport: true,
},
flags: {},
},
},
db.rawDatabase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ beforeAll(async () => {
db.stores,
{
experimental: {
flags: {
featuresExportImport: true,
},
flags: {},
},
},
db.rawDatabase,
Expand Down
1 change: 0 additions & 1 deletion src/lib/openapi/spec/ui-config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export const uiConfigSchema = {
name: 'disabled',
enabled: false,
},
featuresExportImport: true,
},
additionalProperties: {
anyOf: [
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export type IFlagKey =
| 'responseTimeWithAppNameKillSwitch'
| 'maintenanceMode'
| 'messageBanner'
| 'featuresExportImport'
| 'caseInsensitiveInOperators'
| 'strictSchemaValidation'
| 'personalAccessTokensKillSwitch'
Expand Down Expand Up @@ -99,10 +98,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_MESSAGE_BANNER_PAYLOAD ?? '',
},
},
featuresExportImport: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_FEATURES_EXPORT_IMPORT,
true,
),
caseInsensitiveInOperators: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_CASE_INSENSITIVE_IN_OPERATORS,
false,
Expand Down

0 comments on commit 1637cc2

Please sign in to comment.