mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
refactor go code for pocketbase 0.23.0 (#300)
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
"github.com/pocketbase/pocketbase/daos"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
m "github.com/pocketbase/pocketbase/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
m.Register(func(db dbx.Builder) error {
|
||||
dao := daos.New(db)
|
||||
|
||||
settings, _ := dao.FindSettings()
|
||||
m.Register(func(app core.App) error {
|
||||
settings := app.Settings()
|
||||
settings.Meta.AppName = "Beszel"
|
||||
settings.Meta.HideControls = true
|
||||
|
||||
return dao.SaveSettings(settings)
|
||||
return app.Save(settings)
|
||||
}, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user