feat(sca): persist redirect tokens to sqlite with 10min ttl (#22)

This commit is contained in:
2026-05-30 14:12:57 +02:00
committed by GitHub
parent 7c8a2b562f
commit 3a3c7ee80b
4 changed files with 50 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ package database
import (
"fmt"
"log"
"terminalShop/pkg/models"
"gorm.io/gorm"
@@ -24,6 +25,7 @@ func Migrate(db *gorm.DB) error {
&models.OrderItem{}, // Line items within orders
&models.Address{}, // Saved addresses
&models.OrderEvent{},
&models.PayRedirect{}, // short-token -> stripe url store (10 min TTL)
); err != nil {
return fmt.Errorf("migration failed: %w", err)
}