fix chapter edit changes being reported as comment add.

This commit is contained in:
2020-08-19 21:26:56 +02:00
parent dc3f77f8da
commit 6fa2dc9800
+2 -2
View File
@@ -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