Start move to unify ID generation
All checks were successful
/ docker (push) Successful in 4m14s

This commit is contained in:
Melody Becker 2025-04-28 17:28:28 +02:00
parent aa2b056f8b
commit d32818af09
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
8 changed files with 51 additions and 8 deletions

View file

@ -5,10 +5,10 @@ import (
"git.mstar.dev/mstar/goutils/other"
"git.mstar.dev/mstar/goutils/sliceutils"
"github.com/google/uuid"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"git.mstar.dev/mstar/linstrom/shared"
"git.mstar.dev/mstar/linstrom/storage-new/dbgen"
"git.mstar.dev/mstar/linstrom/storage-new/models"
)
@ -88,7 +88,7 @@ func (a *Authenticator) PerformPasswordLogin(
User: *acc,
UserId: acc.ID,
ExpiresAt: calcAccessExpirationTimestamp(),
Token: uuid.NewString(),
Token: shared.NewId(),
}
err = dbgen.LoginProcessToken.Clauses(clause.OnConflict{UpdateAll: true}).
Create(&loginToken)