initial commit

This commit is contained in:
Daniel Noulet 2026-09-19 14:48:42 +02:00
parent b50c054b30
commit fac7588d23
21 changed files with 266 additions and 55 deletions

View file

@ -44,7 +44,8 @@ type GORMSessionRepository struct{ db *gorm.DB }
func NewSessionRepository(db *gorm.DB) ISessionRepository { return &GORMSessionRepository{db} }
func (r *GORMSessionRepository) Create(ctx context.Context, d domain.Session) error {
return r.db.WithContext(ctx).Create(persistence.SessionFromDomain(d)).Error
model := persistence.SessionFromDomain(d)
return r.db.WithContext(ctx).Create(&model).Error
}
func (r *GORMSessionRepository) FindValid(ctx context.Context, t string) (domain.Session, error) {
var m persistence.SessionModel