Skip to content

Commit 130b386

Browse files
Fix: lifetime API command doesn't update. (#9685)
Seems the previous value was hardcoded. Now we check the values you set instead.
1 parent e436ef2 commit 130b386

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/component/featureTypes/FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
103103
`curl --location --request PUT '${uiConfig.unleashUrl}/api/admin/feature-types/${featureType?.id}/lifetime`,
104104
"--header 'Authorization: INSERT_API_KEY'",
105105
"--header 'Content-Type: application/json'",
106-
'--data-raw \'{\n "lifetimeDays": 7\n}\'',
106+
`--data-raw \'{\n "lifetimeDays": ${doesntExpire ? 0 : lifetime}\n}\'`,
107107
].join(' \\\n'),
108-
[uiConfig, featureType?.id],
108+
[uiConfig, featureType?.id, lifetime, doesntExpire],
109109
);
110110

111111
if (!loading && !featureType) {

0 commit comments

Comments
 (0)