feat: serve the quiz API under /_quizzes/api/v1 behind jwt.auth

This commit is contained in:
Jakub Zych
2026-10-02 14:13:30 +02:00
parent 4d4da5dc14
commit effe640549
16 changed files with 2232 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
// Code generated by summer make. DO NOT EDIT.
package updates
import (
"github.com/go-gormigrate/gormigrate/v2"
"gorm.io/gorm"
)
// AddCategoryToAttempts returns the 20261002120625_add_category_to_attempts gormigrate entry.
// An attempt started with a category covers only that category's questions.
func AddCategoryToAttempts() *gormigrate.Migration {
return &gormigrate.Migration{
ID: "20261002120625_add_category_to_attempts",
Migrate: func(tx *gorm.DB) error {
return tx.Exec("ALTER TABLE golem15_quizzes_attempts ADD COLUMN category VARCHAR(255) NULL").Error
},
Rollback: func(tx *gorm.DB) error {
return tx.Exec("ALTER TABLE golem15_quizzes_attempts DROP COLUMN IF EXISTS category").Error
},
}
}