summaryrefslogtreecommitdiffhomepage
path: root/src/dbx/users.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbx/users.go')
-rw-r--r--src/dbx/users.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dbx/users.go b/src/dbx/users.go
index d8305f8..e2270db 100644
--- a/src/dbx/users.go
+++ b/src/dbx/users.go
@@ -9,10 +9,11 @@ import (
)
type User struct {
- Email string `db:"email"`
- Username string `db:"username"`
- Password string `db:"password"`
- AdminP bool `db:"adminp"`
+ Email string `db:"email"`
+ Username string `db:"username"`
+ Password string `db:"password"`
+ AdminP bool `db:"adminp"`
+ Translates string `db:"translates"`
}
var LoginFailed = errors.New("No user with the given username and password")
@@ -31,9 +32,10 @@ func CreateUser(user User) error {
email,
username,
password,
- adminp
- ) VALUES (?, ?, ?, ?)
- `, user.Email, user.Username, string(hash), user.AdminP)
+ adminp,
+ translates
+ ) VALUES (?, ?, ?, ?, ?)
+ `, user.Email, user.Username, string(hash), user.AdminP, user.Translates)
return err
}