func CreateController(w http.ResponseWriter, r *http.Request) { r.ParseForm() j := job.Job{ Name: r.PostForm.Get("job[name]"), UserId: helpers.CurrentUser(r).Id, } d := make(map[string]interface{}) if j.Save() { d["job"] = j } w.Write(util.JSON(d)) }