insert, err := DB.Prepare("INSERT INTO users(login, email, pass) VALUES( ?, ?, ?)")
if err != nil {
ps["code"] = "500"
ps["message"] = "Ошибка сервера"
log.Println(err.Error())
}
_, err = insert.Exec(ps["login"], ps["email"], ps["pass"])
if err != nil {
log.Println(err)
ps["code"] = "2"
ps["message"] = "Такой пользователь уже есть"
return ps
}
ps["code"] = "1"
ps["message"] = "Ok"
return ps