This commit is contained in:
@@ -55,6 +55,10 @@ func (r *mutationResolver) EditChapter(ctx context.Context, input input.ChapterE
|
||||
return models.Chapter{}, errors.New("Unauthorized")
|
||||
}
|
||||
|
||||
if input.ClearFictionalDate != nil && *input.ClearFictionalDate == true {
|
||||
input.FictionalDate = &time.Time{}
|
||||
}
|
||||
|
||||
return chapters.Edit(chapter, input.Title, input.Source, input.FictionalDate)
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,9 @@ input ChapterEditInput {
|
||||
|
||||
# Set the fictional date for a chapter
|
||||
fictionalDate: Date
|
||||
|
||||
# Remove the fictional date for a chapter
|
||||
clearFictionalDate: Boolean
|
||||
}
|
||||
|
||||
# Input for removeChapter mutation
|
||||
|
||||
Reference in New Issue
Block a user