Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
Use an unwrap operator instead of a subscribe syntax (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer authored Apr 16, 2020
1 parent a52d510 commit 78dd5da
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ AuthEndpoint, RestEndpointModifier {
.mapEach {
$0[keyPath: self.intermediateKeyPath].value
}.map {
$0[0]
}.unwrap(or: Abort(.internalServerError))
$0.first
}
.unwrap(or: Abort(.internalServerError))
.unwrap(or: Abort(.internalServerError))
.flatMap {
I.query(on: req.db)
.filter(\I._$id == $0.id!)
Expand Down

0 comments on commit 78dd5da

Please sign in to comment.