mirror of
https://gitee.com/fit2cloud-feizhiyun/1Panel.git
synced 2024-12-05 05:19:08 +08:00
26 lines
616 B
Go
26 lines
616 B
Go
package business
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/1Panel-dev/1Panel/backend/app/service"
|
|
"github.com/1Panel-dev/1Panel/backend/global"
|
|
)
|
|
|
|
func Init() {
|
|
setting, err := service.NewISettingService().GetSettingInfo()
|
|
if err != nil {
|
|
global.LOG.Errorf("sync app error: %s", err.Error())
|
|
return
|
|
}
|
|
if setting.AppStoreVersion != "" {
|
|
fmt.Println(setting.AppStoreVersion)
|
|
global.LOG.Info("do not sync")
|
|
return
|
|
}
|
|
global.LOG.Info("sync app start...")
|
|
if err := service.NewIAppService().SyncAppList(); err != nil {
|
|
global.LOG.Errorf("sync app error: %s", err.Error())
|
|
}
|
|
global.LOG.Info("sync app success")
|
|
}
|