Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Tupikin <MrRefactoring@yandex.ru>2026-04-19 22:24:24 +0300
committerGitHub <noreply@github.com>2026-04-19 22:24:24 +0300
commit7466916e0206d55826d74f37c251bb5e40182c00 (patch)
tree2c887558c71f34b76e541c7bf7d57a420ed3c9ed /database/db.go
parent96b568b8389fd5a3ce228d5fb82ec9742d145b15 (diff)
Add custom geosite/geoip URL sources (#3980)
* feat: add custom geosite/geoip URL sources Register DB model, panel API, index/xray UI, and i18n. * fix
Diffstat (limited to 'database/db.go')
-rw-r--r--database/db.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/db.go b/database/db.go
index 6b579dd9..2e468587 100644
--- a/database/db.go
+++ b/database/db.go
@@ -38,6 +38,7 @@ func initModels() error {
&model.InboundClientIps{},
&xray.ClientTraffic{},
&model.HistoryOfSeeders{},
+ &model.CustomGeoResource{},
}
for _, model := range models {
if err := db.AutoMigrate(model); err != nil {
@@ -175,9 +176,8 @@ func GetDB() *gorm.DB {
return db
}
-// IsNotFound checks if the given error is a GORM record not found error.
func IsNotFound(err error) bool {
- return err == gorm.ErrRecordNotFound
+ return errors.Is(err, gorm.ErrRecordNotFound)
}
// IsSQLiteDB checks if the given file is a valid SQLite database by reading its signature.