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

Fix: lifetime API command doesn't update. (#9685)

Seems the previous value was hardcoded. Now we check the values you set
instead.
This commit is contained in:
Thomas Heartman 2025-04-02 15:35:29 +02:00 committed by GitHub
parent e436ef29f1
commit 130b3869cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,9 +103,9 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
`curl --location --request PUT '${uiConfig.unleashUrl}/api/admin/feature-types/${featureType?.id}/lifetime`,
"--header 'Authorization: INSERT_API_KEY'",
"--header 'Content-Type: application/json'",
'--data-raw \'{\n "lifetimeDays": 7\n}\'',
`--data-raw \'{\n "lifetimeDays": ${doesntExpire ? 0 : lifetime}\n}\'`,
].join(' \\\n'),
[uiConfig, featureType?.id],
[uiConfig, featureType?.id, lifetime, doesntExpire],
);
if (!loading && !featureType) {