build
This commit is contained in:
parent
9f07af5e75
commit
f442d1a980
|
@ -7,7 +7,7 @@ job:
|
|||
- docker stop esg-report-backend
|
||||
- docker rm esg-report-backend
|
||||
- docker build -t esg-report-backend .
|
||||
- docker run -d --restart=always --network=host --name esg-report-backend esg-report-backend
|
||||
- docker run -d --restart=always 51002:51002 --name esg-report-backend esg-report-backend
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
|
|
|
@ -31,7 +31,7 @@ func SetNews(c *gin.Context){
|
|||
var list Models.List
|
||||
list.Title = c.PostForm("title")
|
||||
list.Cover = c.PostForm("cover")
|
||||
list.Picture = c.PostForm("img")
|
||||
list.Content = c.PostForm("img")
|
||||
data := list.SetNews()
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"data": data,
|
||||
|
|
|
@ -8,7 +8,7 @@ type List struct{
|
|||
ID int `gorm:"primary_key"`
|
||||
Title string `gorm:"column:title"`
|
||||
Cover string `gorm:"column:cover"`
|
||||
Picture string `gorm:"column:picture"`
|
||||
Content string `gorm:"column:content"`
|
||||
}
|
||||
|
||||
//查询列表数据库
|
||||
|
|
Loading…
Reference in New Issue