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.

14 lines
303 B

6 years ago
6 years ago
6 years ago
  1. package channels
  2. import "git.aiterp.net/rpdata/api/models"
  3. // FindName finds a channel by its id (its name).
  4. func FindName(name string) (*models.Channel, error) {
  5. channel := models.Channel{}
  6. err := collection.FindId(name).One(&channel)
  7. if err != nil {
  8. return nil, err
  9. }
  10. return &channel, nil
  11. }