1Panel/backend/init/business/business.go

21 lines
530 B
Go
Raw Normal View History

2022-11-23 09:44:24 +00:00
package business
import (
"github.com/1Panel-dev/1Panel/backend/app/service"
"github.com/1Panel-dev/1Panel/backend/global"
"github.com/1Panel-dev/1Panel/backend/utils/common"
2022-11-23 09:44:24 +00:00
)
func Init() {
setting, err := service.NewISettingService().GetSettingInfo()
if err != nil {
global.LOG.Errorf("sync app error: %s", err.Error())
}
if common.CompareVersion(setting.AppStoreVersion, "0.0") {
return
}
2023-02-13 07:46:14 +00:00
if err := service.NewIAppService().SyncAppList(); err != nil {
2022-11-23 09:44:24 +00:00
global.LOG.Errorf("sync app error: %s", err.Error())
}
}