POST:/users works

This commit is contained in:
2022-11-18 21:25:40 +01:00
parent 34a27d9ca4
commit 5991631bfa
44 changed files with 2131 additions and 737 deletions

View File

@@ -7,7 +7,6 @@ import (
"blackforestbytes.com/simplecloudnotifier/common/ginext"
"blackforestbytes.com/simplecloudnotifier/db"
"blackforestbytes.com/simplecloudnotifier/logic"
"context"
"fmt"
"github.com/rs/zerolog/log"
)
@@ -19,13 +18,17 @@ func main() {
log.Info().Msg(fmt.Sprintf("Starting with config-namespace <%s>", conf.Namespace))
sqlite, err := db.NewDatabase(context.Background(), conf)
sqlite, err := db.NewDatabase(conf)
if err != nil {
panic(err)
}
app := logic.NewApp(sqlite)
if err := app.Migrate(); err != nil {
panic(err)
}
ginengine := ginext.NewEngine(conf)
router := api.NewRouter(app)