diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index a232041..15937ac 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -479,6 +479,9 @@ func EditPost(item models.Post) (models.Post, error) { return item, err } + database.C.Model(&item).Association("Categories").Replace(item.Categories) + database.C.Model(&item).Association("Tags").Replace(item.Tags) + err = database.C.Save(&item).Error return item, err