Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Apr 6, 2023
1 parent e07eb3e commit 3963f1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
import io.iohk.atala.mercury.model._

final case class TrustPingResponse(
`type`: PIURI = TrustPing.`type`,
`type`: PIURI = TrustPingResponse.`type`,
id: String = java.util.UUID.randomUUID().toString,
thid: String,
from: DidId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,16 @@ object Modules {
case Some(true) => Some(trustPing.makeReply.makeMessage)
case Some(false) => None
}
// service <- ZIO.service[HttpClient]
// aaa = service.postDIDComm(service)
_ = trustPingResponseMsg match
case None => ZIO.logWarning(s"Did not reply to the ${TrustPing.`type`}")
case Some(message) => MessagingService.send(message)
_ <- trustPingResponseMsg match
case None => ZIO.logWarning(s"Did not reply to the ${TrustPing.`type`}")
case Some(message) =>
MessagingService
.send(message)
.flatMap(response =>
response.status match
case c if c >= 200 & c < 300 => ZIO.unit
case c => ZIO.logWarning(response.toString())
)
} yield ()

// ########################
Expand Down

0 comments on commit 3963f1d

Please sign in to comment.