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