Exemplo n.º 1
0
func Comfirmation(c web.C, w http.ResponseWriter, r *http.Request) {
	user := controllers.User{}
	user.VerifiedToken = r.FormValue("verifiedtoken")
	errr := user.ComfirmAccount()
	if strings.Compare(errr.Status, "KO") == 0 {
		helpers.RenderJSON(w, errr, http.StatusOK)
	} else {
		helpers.RenderOk(w)
	}
}
Exemplo n.º 2
0
func Signup(c web.C, w http.ResponseWriter, r *http.Request) {
	user := controllers.User{}
	helpers.RenderJSON(w, user.CreateAccount(r.FormValue("login"), r.FormValue("email"), r.FormValue("password"), r.FormValue("password2")), http.StatusOK)
}