mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-02-20 02:25:38 +08:00
优化代码
This commit is contained in:
@@ -93,16 +93,3 @@ func (this *AuthorityKeyDAO) ResetKey(tx *dbs.Tx) error {
|
||||
Delete()
|
||||
return err
|
||||
}
|
||||
|
||||
// IsPlus 判断是否为企业版
|
||||
func (this *AuthorityKeyDAO) IsPlus(tx *dbs.Tx) (bool, error) {
|
||||
key, err := this.ReadKey(tx)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if key == nil {
|
||||
return false, nil
|
||||
}
|
||||
teaconst.IsPlus = key.DayTo >= timeutil.Format("Y-m-d")
|
||||
return teaconst.IsPlus, nil
|
||||
}
|
||||
|
||||
10
internal/db/models/authority/authority_key_dao_community.go
Normal file
10
internal/db/models/authority/authority_key_dao_community.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
//go:build community
|
||||
// +build community
|
||||
|
||||
package authority
|
||||
|
||||
// IsPlus 判断是否为企业版
|
||||
func (this *AuthorityKeyDAO) IsPlus(tx *dbs.Tx) (bool, error) {
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user