More work on getting auth fetch verification working

This commit is contained in:
Melody Becker 2025-04-20 22:10:35 +02:00
parent 7eac1db475
commit 9957ba8302
12 changed files with 434 additions and 205 deletions

View file

@ -135,6 +135,7 @@ func oldServer() {
}
func newServer() {
log.Info().Msg("Connectin to db")
db, err := gorm.Open(
postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
&gorm.Config{
@ -145,9 +146,11 @@ func newServer() {
log.Fatal().Err(err).Msg("Failed to start db")
}
dbgen.SetDefault(db)
log.Info().Msg("Applying migrations")
if err = storagenew.Migrate(db); err != nil {
log.Fatal().Err(err).Msg("Failed to automigrate structure")
}
log.Info().Msg("Inserting self into db")
if err = storagenew.InsertSelf(); err != nil {
log.Fatal().Err(err).Msg("Failed to insert self properly")
}