Skip to content

Commit

Permalink
refactor(useCheckLicense.ts): adapt license api
Browse files Browse the repository at this point in the history
  • Loading branch information
oucb authored and ysfscream committed Oct 26, 2023
1 parent 4c02085 commit aa47d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/composables/useCheckLicense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default () => {
const isShowTip = Cookies.get('licenseTipVisible')

if (isShowTip !== 'false') {
const { error, valid_until, license_type, max_nodes } = data
const { error, valid_until, license_type, max_node_tags } = data

isHasLicense.value = !(Number(error) === 2400) // no License
isLicenseInvalid.value = Number(error) === 2401 // Invalid
Expand All @@ -34,7 +34,7 @@ export default () => {
isHardwareMismatch.value = Number(error) === 2406 // hardware mismatch

isLicenseReadyExpiry.value = new Date(valid_until).getTime() - 1000 * 60 * 60 * 24 * 3 < Date.now()
isDefaultLicense.value = license_type === 'trial' && max_nodes === 30 // default license
isDefaultLicense.value = license_type === 'trial' && max_node_tags === 30 // default license

if (
!isHasLicense.value ||
Expand Down

0 comments on commit aa47d92

Please sign in to comment.