GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
267 B

  1. package chapters
  2. import "git.aiterp.net/rpdata/api/models"
  3. // Remove removes a chapter.
  4. func Remove(chapter models.Chapter) (models.Chapter, error) {
  5. if err := collection.RemoveId(chapter.ID); err != nil {
  6. return models.Chapter{}, err
  7. }
  8. return chapter, nil
  9. }