added user signup feature

This commit is contained in:
2025-09-26 23:57:36 +02:00
parent 2f0a9b5127
commit 57355fe9ac
15 changed files with 242 additions and 14 deletions

View File

@@ -19,6 +19,7 @@ func Initdb(databasePath string, demoDataPath string) *gorm.DB {
}
// Migrate the schema
db.AutoMigrate(&model.Book{})
db.AutoMigrate(&model.User{})
var book model.Book
queryResult := db.Limit(1).Find(&book)
if queryResult.RowsAffected == 0 && demoDataPath != "" {