Esempio n. 1
0
/**
 * Creert een nieuwe comment (tip)
 *
 * @author A. Glansbeek en P. Kompier
 * @version 1.0
 * @date 2011-12-18
 */
func (cr *CommentController) Create(cx *goweb.Context) {
	reqValues := cx.GetReqData()

	params := map[string]string{
		"post_id": reqValues.Get("post_id"),
		"name":    reqValues.Get("name"),
		"email":   reqValues.Get("email"),
		"content": reqValues.Get("content"),
	}

	var m structs.WordpressCommentResponse

	models.CallWordpressApi(cx, &m, "submit_comment", params)

	cx.RespondWithData(structs.TipResponse{m.Status})
}