Skip to content

Commit

Permalink
F0ld one more
Browse files Browse the repository at this point in the history
  • Loading branch information
zrdzn committed Nov 22, 2024
1 parent 4144acc commit 1851925
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ internal class OciEndpoints(
.mapErr { badRequest("Request does not contain valid body") }
.flatMap { saveManifestRequest ->
ociFacade.validateDigest(reference)
.flatMap { ociFacade.saveManifest(namespace, reference, saveManifestRequest) }
.flatMapErr { ociFacade.saveTaggedManifest(namespace, reference, saveManifestRequest) }
.fold(
{ ociFacade.saveManifest(namespace, reference, saveManifestRequest) },
{ ociFacade.saveTaggedManifest(namespace, reference, saveManifestRequest) }
)
}
}
}
Expand Down

0 comments on commit 1851925

Please sign in to comment.