feat: add jwt
This commit is contained in:
17
service/article/article.go
Normal file
17
service/article/article.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package article
|
||||
|
||||
import (
|
||||
"nCovTrack-Backend/global"
|
||||
"nCovTrack-Backend/models"
|
||||
)
|
||||
|
||||
func GetArticleList() []models.Article {
|
||||
return make([]models.Article, 0)
|
||||
}
|
||||
|
||||
func SaveArticle(article models.Article) {
|
||||
// 前端校验
|
||||
// articlea := &models.Article{Content: "#Ceshi", Cover: "https://www.baidu.com/link?url=AWfrkr2rXUGVmKuD08cYx7GwAfQw7qXy_ZczQuH9N_raTP0_eRTv4eZgsdYhtMhS8F7nVl9WfdF01byCD5DAKK&wd=&eqid=b50bb6b100004750000000056202107a", Resume: "sss", Tags: "s", Title: "title", CreateUser: "1", ModifyUser: "1", CreateTime: time.Now(), ModifyTime: time.Now()}
|
||||
tx := global.Db.Create(article)
|
||||
print(tx)
|
||||
}
|
||||
Reference in New Issue
Block a user