Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 committed Sep 27, 2024
1 parent 1f84d4f commit b61c2bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zio-http/shared/src/main/scala/zio/http/Routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@ final case class Routes[-Env, +Err](routes: Chunk[zio.http.Route[Env, Err]]) { s
val allowedMethods = tree.getAllMethods(req.path)
chunk.length match {
case 0 =>
if (allowedMethods.isEmpty) {
Handler.notFound
if (!allowedMethods.isEmpty) {
Handler.status(Status.MethodNotAllowed)
}
if (!Method.knownMethods.contains(req.method)) {
Handler.status(Status.NotImplemented)
} else { Handler.status(Status.MethodNotAllowed) }
} else { Handler.notFound }
case 1 => chunk(0)
case n => // TODO: Support precomputed fallback among all chunk elements
var acc = chunk(0)
Expand Down

0 comments on commit b61c2bd

Please sign in to comment.