feat: add auth flow and login guard for api/web

This commit is contained in:
2026-02-27 11:07:25 +08:00
parent f2a1e2d6fe
commit 60ce70f532
15 changed files with 377 additions and 11 deletions

View File

@@ -13,5 +13,5 @@ func InitDB(cfg *config.Config) (*gorm.DB, error) {
}
func AutoMigrate(db *gorm.DB) error {
return db.AutoMigrate(&model.Word{}, &model.MemoryRecord{})
return db.AutoMigrate(&model.User{}, &model.Word{}, &model.MemoryRecord{})
}