BUGFIX: Almanach-Bilder-Import mit Kommas

This commit is contained in:
Simon Martens
2025-02-11 12:09:48 +01:00
parent 0f87df8e94
commit ad91cbd4c6
3 changed files with 11 additions and 48 deletions

36
;
View File

@@ -1,36 +0,0 @@
package main
import (
"log"
"github.com/Theodor-Springmann-Stiftung/musenalm/app"
"github.com/Theodor-Springmann-Stiftung/musenalm/cmd"
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers"
_ "github.com/Theodor-Springmann-Stiftung/musenalm/migrations"
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages"
"github.com/pocketbase/pocketbase/plugins/migratecmd"
)
const (
DEV_CONFIG = "config.dev.json"
DEFAULT_CONFIG = "config.json"
)
func main() {
cfg := app.NewConfigProvider([]string{DEFAULT_CONFIG}, []string{DEV_CONFIG})
if err := cfg.Read(); err != nil {
helpers.Assert(err, "Error reading config")
}
app := app.New(*cfg.Config)
app.PB.RootCmd.AddCommand(cmd.AddResetPagesCommand(app.PB, &app))
migratecmd.MustRegister(app.PB, app.PB.RootCmd, migratecmd.Config{
Automigrate: false,
TemplateLang: migratecmd.TemplateLangGo,
})
if err := app.Serve(); err != nil {
log.Fatal(err)
}
}