|
|
@ -7,6 +7,7 @@ import ( |
|
|
|
|
|
|
|
"git.aiterp.net/rpdata/api/models/changekeys" |
|
|
|
"git.aiterp.net/rpdata/api/models/changes" |
|
|
|
"git.aiterp.net/rpdata/api/models/comments" |
|
|
|
|
|
|
|
"git.aiterp.net/rpdata/api/internal/auth" |
|
|
|
"git.aiterp.net/rpdata/api/models/stories" |
|
|
@ -155,6 +156,11 @@ func (r *mutationResolver) RemoveChapter(ctx context.Context, input input.Chapte |
|
|
|
return models.Chapter{}, errors.New("Failed to remove chapter: " + err.Error()) |
|
|
|
} |
|
|
|
|
|
|
|
err = comments.RemoveChapter(chapter) |
|
|
|
if err != nil { |
|
|
|
return models.Chapter{}, errors.New("Chapter was removed, but comment removal failed: " + err.Error()) |
|
|
|
} |
|
|
|
|
|
|
|
go func() { |
|
|
|
story, err := stories.FindID(chapter.StoryID) |
|
|
|
if err != nil { |
|
|
|