finish
This commit is contained in:
@@ -39,8 +39,8 @@ func listArticles(isPublish int, createUser int) *[]models.ListArticle {
|
||||
}
|
||||
|
||||
//SaveArticle save the articles
|
||||
func SaveArticle(article map[string]interface{}) (ok bool) {
|
||||
models.BeforeSave(article, -1)
|
||||
func SaveArticle(claims models.TokenClaims, article map[string]interface{}) (ok bool) {
|
||||
models.BeforeSave(article, claims.ID)
|
||||
ok, rows := models.Upsert[models.BackArticle](article)
|
||||
return ok && rows != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user