🚀 Some improvements for x-ui.sh and ip job (#665)

This commit is contained in:
Hamidreza
2023-07-01 15:56:43 +03:30
committed by GitHub
parent f726474a5d
commit 1028319386
17 changed files with 428 additions and 294 deletions

View File

@@ -6,6 +6,7 @@ import (
"io/fs"
"os"
"path"
"x-ui/config"
"x-ui/database/model"
"x-ui/xray"
@@ -26,7 +27,6 @@ var initializers = []func() error{
}
func initUser() error {
err := db.AutoMigrate(&model.User{})
if err != nil {
return err
@@ -54,9 +54,11 @@ func initInbound() error {
func initSetting() error {
return db.AutoMigrate(&model.Setting{})
}
func initInboundClientIps() error {
return db.AutoMigrate(&model.InboundClientIps{})
}
func initClientTraffic() error {
return db.AutoMigrate(&xray.ClientTraffic{})
}