Skip to content

Commit

Permalink
fix: 修复了文章无法正常更新的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Redish101 committed Feb 24, 2025
1 parent bbf7821 commit 8dab70b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/handler/article_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ func ArticleUpdate(app *core.App, router fiber.Router) {
aiSummary := ai.Summary(app, params.Content)

if aiSummary != "" {
article, err = a.Where(a.Slug.Eq(article.Slug)).First()

article.AiSummary = &aiSummary

_, err = a.Where(a.Slug.Eq(article.Slug)).Updates(article)

if err != nil {
Expand Down

0 comments on commit 8dab70b

Please sign in to comment.