private def pushGeneric()

in notification/app/notification/controllers/Main.scala [120:135]


  private def pushGeneric(notification: Notification, notificationReceivedTime: Instant) = {
    prepareReportAndSendPush(notification, notificationReceivedTime) flatMap {
      case Right(report) =>
        reportPushSent(notification, List(report)) map {
          case Right(_) =>
            logger.info(s"Notification was sent: $notification")
            Created(toJson(PushResult(notification.id)))
          case Left(error) =>
            logger.error(s"Notification ($notification) sent but report could not be stored ($error)")
            Created(toJson(PushResult(notification.id).withReportingError(error)))
        }
      case Left(error) =>
        logger.error(s"Notification ($notification) could not be sent: $error")
        Future.successful(InternalServerError)
    }
  }