def getContentSource()

in app/com/gu/floodgate/contentsource/ContentSourceService.scala [19:25]


  def getContentSource(id: String, environment: String): Either[CustomError, ContentSource] = {
    contentSourceTable.getItem(id, environment) match {
      case Some(result) =>
        result.leftMap(err => ContentSourceNotFound(s"A content source with id: $id does not exist."))
      case None => Left(ContentSourceNotFound(s"A content source with id: $id does not exist."))
    }
  }