This commit is contained in:
@@ -86,8 +86,8 @@ func handelRegister(c *gin.Context) {
|
||||
|
||||
encryptedPassowrd := EncryptPassword(user.Password)
|
||||
|
||||
ret := db.QueryRow(`insert into users(username, password) values ($1, $2) returning id`,
|
||||
user.Username, encryptedPassowrd)
|
||||
ret := db.QueryRow(`insert into users(username, password, role) values ($1, $2, $3) returning id`,
|
||||
user.Username, encryptedPassowrd, user.Role)
|
||||
|
||||
err = ret.Scan(&user.Id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user