Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerman committed Feb 13, 2024
1 parent 45f83c4 commit b88ff89
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion webapp/src/main/scala/example/webapp/App.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package example.webapp

import outwatch._
import outwatch.dsl._
import funstack.web.Fun
import funstack.client.web.Fun

object App {

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/scala/example/webapp/Components.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import colibri.Subject
import example.api
import outwatch._
import outwatch.dsl._
import funstack.web.tapir
import funstack.client.web.Fun

object Components {
import example.api.HttpApi
Expand All @@ -16,7 +16,7 @@ object Components {
b("My books: "),
span(
cls := "tapir-result",
tapir.Fun.http
Fun.httpApi
.client(HttpApi.booksListing)((HttpApi.BooksFromYear("drama", 2011), 10))
.map(_.toString),
),
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/main/scala/example/webapp/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package example.webapp
import cats.effect.{IO, IOApp}
import outwatch.Outwatch

import funstack.web.Fun
import funstack.client.web.Fun

object Main extends IOApp.Simple {
LoadCss()

override def run =
Fun.ws.start &> Outwatch.renderInto[IO]("#app", App.layout)
Fun.wsRpc.start &> Outwatch.renderInto[IO]("#app", App.layout)
}
8 changes: 4 additions & 4 deletions webapp/src/main/scala/example/webapp/RpcApiClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import cats.effect.IO
import example.api.{EventApi, RpcApi}
import colibri.Observable
import sloth.Client
import funstack.web.Fun
import funstack.client.web.Fun

import chameleon.ext.circe._

object WsRpcClient {
val client = Client(Fun.ws.transport[String])
val client = Client(Fun.wsRpc.transport[String])
val api: RpcApi[IO] = client.wire[RpcApi[IO]]

val eventClient = Client(Fun.ws.streamsTransport[String])
val eventClient = Client(Fun.wsRpc.streamsTransport[String])
val eventApi: EventApi[Observable] = eventClient.wire[EventApi[Observable]]
}

object HttpRpcClient {
val client = Client(Fun.http.transport[String])
val client = Client(Fun.httpRpc.transport[String])
val api: RpcApi[IO] = client.wire[RpcApi[IO]]
}

0 comments on commit b88ff89

Please sign in to comment.