func GetOwnPosts(c web.C, w http.ResponseWriter, r *http.Request) { post := controllers.Post{} post.Token = r.FormValue("token") err := post.GetOwnPosts() if err.Status == "KO" { helpers.RenderJSON(w, err, http.StatusOK) } else { post.PostsModel.Status = "OK" helpers.RenderJSON(w, post.PostsModel, http.StatusOK) } }