func (this *ObjectController) Post() { var ob models.Object json.Unmarshal(this.Ctx.Input.RequestBody, &ob) objectid := models.AddOne(ob) this.Data["json"] = map[string]string{"ObjectId": objectid} this.ServeJson() }
func (this *ObejctController) Post() { var ob models.Object json.Unmarshal(this.Ctx.RequestBody, &ob) objectid := models.AddOne(ob) this.Data["json"] = "{\"ObjectId\":\"" + objectid + "\"}" this.ServeJson() }