Browse Source

fix chapter edit changes being reported as comment add.

master
Gisle Aune 4 years ago
parent
commit
6fa2dc9800
  1. 4
      services/stories.go

4
services/stories.go

@ -265,9 +265,9 @@ func (s *StoryService) EditChapter(ctx context.Context, chapter *models.Chapter,
}
if story, err := s.stories.Find(ctx, chapter.StoryID); err == nil {
s.changeService.Submit(ctx, "Comment", "add", story.Listed, changekeys.Many(story, chapter), chapter)
s.changeService.Submit(ctx, "Chapter", "edit", story.Listed, changekeys.Many(story, chapter), chapter)
} else {
s.changeService.Submit(ctx, "Comment", "add", false, changekeys.Many(models.Story{ID: chapter.StoryID}, chapter), chapter)
s.changeService.Submit(ctx, "Chapter", "edit", false, changekeys.Many(models.Story{ID: chapter.StoryID}, chapter), chapter)
}
return chapter, nil

Loading…
Cancel
Save