More work on getting auth fetch verification working
This commit is contained in:
parent
7eac1db475
commit
9957ba8302
12 changed files with 434 additions and 205 deletions
3
main.go
3
main.go
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue