Add access token check to auth

This commit is contained in:
Melody Becker 2025-04-04 16:15:25 +02:00
parent 8f53e8a967
commit 6a2b213787
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
4 changed files with 34 additions and 7 deletions

View file

@ -18,12 +18,6 @@ import (
"git.mstar.dev/mstar/linstrom/storage-new/models"
)
const (
dbName = "linstrom"
dbUser = "linstrom"
dbPass = "linstrom"
)
func main() {
other.SetupFlags()
flag.Parse()
@ -32,7 +26,6 @@ func main() {
db, err := gorm.Open(
postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
// postgres.Open(pgContainer.MustConnectionString(context.Background())),
&gorm.Config{
PrepareStmt: false,
Logger: shared.NewGormLogger(log.Logger),
@ -54,6 +47,7 @@ func main() {
log.Info().Msg("Basic operations applied, applying extra features")
g.ApplyInterface(func(models.INotification) {}, models.Notification{})
g.ApplyInterface(func(models.IUser) {}, models.User{})
g.ApplyInterface(func(models.IAccessToken) {}, models.AccessToken{})
log.Info().Msg("Extra features applied, starting generation")
g.Execute()