mirror of
https://github.com/beego/bee.git
synced 2024-11-26 01:11:30 +00:00
fix param to params
This commit is contained in:
parent
a7e6c6a9b5
commit
3114e61537
@ -150,7 +150,7 @@ func (this *ObjectController) Post() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *ObjectController) Get() {
|
func (this *ObjectController) Get() {
|
||||||
objectId := this.Ctx.Input.Param[":objectId"]
|
objectId := this.Ctx.Input.Params[":objectId"]
|
||||||
if objectId != "" {
|
if objectId != "" {
|
||||||
ob, err := models.GetOne(objectId)
|
ob, err := models.GetOne(objectId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -166,7 +166,7 @@ func (this *ObjectController) Get() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *ObjectController) Put() {
|
func (this *ObjectController) Put() {
|
||||||
objectId := this.Ctx.Input.Param[":objectId"]
|
objectId := this.Ctx.Input.Params[":objectId"]
|
||||||
var ob models.Object
|
var ob models.Object
|
||||||
json.Unmarshal(this.Ctx.Input.RequestBody, &ob)
|
json.Unmarshal(this.Ctx.Input.RequestBody, &ob)
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ func (this *ObjectController) Put() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *ObjectController) Delete() {
|
func (this *ObjectController) Delete() {
|
||||||
objectId := this.Ctx.Input.Param[":objectId"]
|
objectId := this.Ctx.Input.Params[":objectId"]
|
||||||
models.Delete(objectId)
|
models.Delete(objectId)
|
||||||
this.Data["json"] = "delete success!"
|
this.Data["json"] = "delete success!"
|
||||||
this.ServeJson()
|
this.ServeJson()
|
||||||
|
Loading…
Reference in New Issue
Block a user