Merge branch 'gin' into 'master'
Gin See merge request root/esg_report_backend!23
This commit is contained in:
commit
44277f3bdf
|
@ -7,7 +7,11 @@ job:
|
||||||
- docker stop esg-report-backend
|
- docker stop esg-report-backend
|
||||||
- docker rm esg-report-backend
|
- docker rm esg-report-backend
|
||||||
- docker build -t esg-report-backend .
|
- docker build -t esg-report-backend .
|
||||||
|
<<<<<<< HEAD
|
||||||
|
- docker run -d --restart=always 51002:51002 --name esg-report-backend esg-report-backend
|
||||||
|
=======
|
||||||
- docker run -d --restart=always -p 51002:51002 --name esg-report-backend esg-report-backend
|
- docker run -d --restart=always -p 51002:51002 --name esg-report-backend esg-report-backend
|
||||||
|
>>>>>>> e858230517deda24eda1b99f6dd8ab321fbb4814
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -31,7 +31,7 @@ func SetNews(c *gin.Context){
|
||||||
var list Models.List
|
var list Models.List
|
||||||
list.Title = c.PostForm("title")
|
list.Title = c.PostForm("title")
|
||||||
list.Cover = c.PostForm("cover")
|
list.Cover = c.PostForm("cover")
|
||||||
list.Picture = c.PostForm("img")
|
list.Content = c.PostForm("img")
|
||||||
data := list.SetNews()
|
data := list.SetNews()
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"data": data,
|
"data": data,
|
||||||
|
|
|
@ -8,7 +8,7 @@ type List struct{
|
||||||
ID int `gorm:"primary_key"`
|
ID int `gorm:"primary_key"`
|
||||||
Title string `gorm:"column:title"`
|
Title string `gorm:"column:title"`
|
||||||
Cover string `gorm:"column:cover"`
|
Cover string `gorm:"column:cover"`
|
||||||
Picture string `gorm:"column:picture"`
|
Content string `gorm:"column:content"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询列表数据库
|
//查询列表数据库
|
||||||
|
|
Loading…
Reference in New Issue