1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

feat: search now also returns project (#5488)

This commit is contained in:
Jaanus Sellin 2023-11-29 12:13:41 +02:00 committed by GitHub
parent f690fe86da
commit d73a2937a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import {
} from '../../../test/e2e/helpers/test-helper'; } from '../../../test/e2e/helpers/test-helper';
import getLogger from '../../../test/fixtures/no-logger'; import getLogger from '../../../test/fixtures/no-logger';
import { FeatureSearchQueryParameters } from '../../openapi/spec/feature-search-query-parameters'; import { FeatureSearchQueryParameters } from '../../openapi/spec/feature-search-query-parameters';
import { IUnleashStores } from '../../types'; import { DEFAULT_PROJECT, IUnleashStores } from '../../types';
import { DEFAULT_ENV } from '../../util'; import { DEFAULT_ENV } from '../../util';
let app: IUnleashTest; let app: IUnleashTest;
@ -536,6 +536,7 @@ test('should search features by description', async () => {
{ {
name: 'my_feature_b', name: 'my_feature_b',
description, description,
project: DEFAULT_PROJECT,
}, },
], ],
}); });

View File

@ -649,6 +649,7 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
'features.name as feature_name', 'features.name as feature_name',
'features.description as description', 'features.description as description',
'features.type as type', 'features.type as type',
'features.project as project',
'features.created_at as created_at', 'features.created_at as created_at',
'features.stale as stale', 'features.stale as stale',
'features.last_seen_at as last_seen_at', 'features.last_seen_at as last_seen_at',
@ -907,6 +908,7 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore {
acc[row.feature_name] = { acc[row.feature_name] = {
type: row.type, type: row.type,
description: row.description, description: row.description,
project: row.project,
favorite: row.favorite, favorite: row.favorite,
name: row.feature_name, name: row.feature_name,
createdAt: row.created_at, createdAt: row.created_at,