File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
http4s-blaze-server/src/main/scala/com/avast/server/toolkit/http4s Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
package com .avast .server .toolkit .http4s
2
2
3
3
import cats .Monad
4
- import cats .data .{ Kleisli , OptionT }
4
+ import cats .syntax . all . _
5
5
import org .http4s .syntax .kleisli ._
6
- import org .http4s .{HttpApp , HttpRoutes , Request }
6
+ import org .http4s .{HttpApp , HttpRoutes }
7
7
8
8
import scala .language .higherKinds
9
9
10
10
object Http4sRouting {
11
11
12
12
/** Makes [[org.http4s.HttpApp ]] from [[org.http4s.HttpRoutes ]] */
13
13
def make [F [_]: Monad ](routes : HttpRoutes [F ], more : HttpRoutes [F ]* ): HttpApp [F ] = {
14
- val semigroup = Kleisli .catsDataSemigroupKForKleisli[OptionT [F , * ], Request [F ]](OptionT .catsDataSemigroupKForOptionT[F ])
15
14
16
15
more
17
- .foldLeft[HttpRoutes [F ]](routes) {
18
- case (acc, moreRoutes) =>
19
- semigroup.combineK(acc, moreRoutes)
20
- }
16
+ .foldLeft[HttpRoutes [F ]](routes)(_.combineK(_))
21
17
.orNotFound
22
18
}
23
19
You can’t perform that action at this time.
0 commit comments