🎨 优化文章相关接口

This commit is contained in:
2025-09-06 21:46:11 +08:00
parent c7ed1b6417
commit 45a95be1d8
3 changed files with 14 additions and 9 deletions

View File

@@ -25,6 +25,7 @@ func (ArticleService) UpdateArticle(req article.Article) (err error) {
err = global.GVA_DB.Model(&article.Article{}).Where("id = ?", req.ID).Updates(&req).Error
return
}
func (ArticleService) GetArticle(id string) (article article.Article, err error) {
err = global.GVA_DB.Where("id = ?", id).First(&article).Error
return