Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
fix(model): delete contents when no subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
indes committed Jun 14, 2019
1 parent 0ddc817 commit 0ca7ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func GenContentAndCheckByFeedItem(s *Source, item *rss.Item) (*Content, bool, er
func DeleteContentsBySourceID(sid uint) {
db := getConnect()
defer db.Close()
db.Where("source_id=?", sid).Delete(Content{})
db.Delete(Content{}, "source_id = ?", sid)
}

func PublishItem(source *Source, item *rss.Item, html string) string {
Expand Down

0 comments on commit 0ca7ccd

Please sign in to comment.