mirror of
https://github.com/wisplite/raster.git
synced 2026-05-01 06:32:44 -05:00
humble beginnings (frontend edition)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
raster.db
|
||||
@@ -7,6 +7,7 @@ type User struct {
|
||||
Username string `gorm:"not null"`
|
||||
Password string `gorm:"not null"`
|
||||
IsAdmin bool `gorm:"not null"`
|
||||
IsActive bool `gorm:"not null"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ func CreateUser(username string, password string) error {
|
||||
Username: username,
|
||||
Password: string(hashedPassword),
|
||||
IsAdmin: false,
|
||||
IsActive: false,
|
||||
}
|
||||
result := db.GetDB().Create(&user)
|
||||
if result.Error != nil {
|
||||
|
||||
Reference in New Issue
Block a user