refactor go code for pocketbase 0.23.0 (#300)

This commit is contained in:
Henry Dollman
2024-11-24 18:15:24 -05:00
parent b4bc8a31aa
commit 14716d36a6
11 changed files with 1592 additions and 779 deletions

View File

@@ -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)
}