Merge branch 'gin' into 'master'

Gin

See merge request root/esg_report_backend!23
This commit is contained in:
徐聿成 2021-12-07 08:45:31 +00:00
commit 44277f3bdf
3 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,11 @@ job:
- docker stop esg-report-backend
- docker rm 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
>>>>>>> e858230517deda24eda1b99f6dd8ab321fbb4814
only:
- master
tags:

View File

@ -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,

View File

@ -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"`
}
//查询列表数据库