Update 13.5.md
func GetBlog(id int) (blog Blog) {
db := GetLink()
db.Where("id=?", id).Find(&blogs)
return
}
models/cart.go:34: undefined: blogs
This commit is contained in:
@@ -167,7 +167,7 @@ DeleteController
|
|||||||
|
|
||||||
func GetBlog(id int) (blog Blog) {
|
func GetBlog(id int) (blog Blog) {
|
||||||
db := GetLink()
|
db := GetLink()
|
||||||
db.Where("id=?", id).Find(&blogs)
|
db.Where("id=?", id).Find(&blog)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user