2022-11-23 17:44:24 +08:00
|
|
|
package business
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/service"
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/global"
|
2023-02-13 11:38:09 +04:00
|
|
|
"github.com/1Panel-dev/1Panel/backend/utils/common"
|
2022-11-23 17:44:24 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func Init() {
|
2023-02-13 11:38:09 +04:00
|
|
|
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
|
|
|
|
}
|
2022-11-23 17:44:24 +08:00
|
|
|
appService := service.AppService{}
|
|
|
|
if err := appService.SyncAppList(); err != nil {
|
|
|
|
global.LOG.Errorf("sync app error: %s", err.Error())
|
|
|
|
}
|
|
|
|
}
|