mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 16:03:21 +00:00
fix: do not save license key when renewing if the expiry date is earlier than that of the current key (#6346)
* fix: do not save license key when renewing if the expiry date is earlier than that of the current key * tmp ref * final ref
This commit is contained in:
@@ -1 +1 @@
|
||||
287f4136a1573eb33ae4b1aae257416aee4ed767
|
||||
3c4027125e0b512b7d322374e83594cd776a9086
|
||||
@@ -84,6 +84,12 @@
|
||||
latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt()
|
||||
}
|
||||
|
||||
async function reloadLicenseKey() {
|
||||
$values['license_key'] = await SettingService.getGlobal({
|
||||
key: 'license_key'
|
||||
})
|
||||
}
|
||||
|
||||
if (setting.key == 'license_key') {
|
||||
reloadKeyrenewalAttemptInfo()
|
||||
}
|
||||
@@ -95,11 +101,11 @@
|
||||
licenseKey: $values['license_key'] || undefined
|
||||
})
|
||||
sendUserToast('Key renewal successful')
|
||||
reloadKeyrenewalAttemptInfo()
|
||||
reloadLicenseKey()
|
||||
} catch (err) {
|
||||
latestKeyRenewalAttempt = await SettingService.getLatestKeyRenewalAttempt()
|
||||
throw err
|
||||
} finally {
|
||||
reloadKeyrenewalAttemptInfo()
|
||||
renewing = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user