func CreatePost(c web.C, w http.ResponseWriter, r *http.Request) { post := controllers.Post{} post.Title = r.FormValue("title") post.Content = r.FormValue("content") post.Token = r.FormValue("token") post.Important, _ = strconv.Atoi(r.FormValue("important")) helpers.RenderJSON(w, post.CreatePost(), http.StatusOK) }