1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

1-1333: fix type problems (#4615)

This change makes it so that you can save flag naming data on project
creation.

There was a mismatch between flattened and nested data in the creation
endpoint. Likely because we went back and forth a bit when we created
the feature originally.
This commit is contained in:
Thomas Heartman 2023-09-06 12:13:48 +02:00 committed by GitHub
parent 2b85eed5b5
commit 0b8b772ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -239,9 +239,9 @@ class ProjectStore implements IProjectStore {
project_mode: project.mode,
default_stickiness: project.defaultStickiness,
feature_limit: project.featureLimit,
feature_naming_pattern: project.featureNamingPattern,
feature_naming_example: project.featureNamingExample,
feature_naming_description: project.featureNamingDescription,
feature_naming_pattern: project.featureNaming?.pattern,
feature_naming_example: project.featureNaming?.example,
feature_naming_description: project.featureNaming?.description,
})
.returning('*');
return this.mapRow({ ...row[0], ...settingsRow[0] });

View File

@ -4,6 +4,7 @@ import {
} from '../../db/project-store';
import {
IEnvironment,
IFeatureNaming,
IProject,
IProjectWithCount,
ProjectMode,
@ -19,9 +20,7 @@ export interface IProjectInsert {
changeRequestsEnabled?: boolean;
mode: ProjectMode;
featureLimit?: number;
featureNamingPattern?: string;
featureNamingExample?: string;
featureNamingDescription?: string;
featureNaming?: IFeatureNaming;
}
export interface IProjectSettings {