fix chapter edit changes being reported as comment add.
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user