1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 19:00:55 +00:00
This commit is contained in:
astaxie 2013-08-19 10:26:10 +08:00
parent aecf4af7f2
commit e02f9a9931

View File

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