Skip to content

Commit

Permalink
Setup API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
johnspade committed May 28, 2023
1 parent 63c7eab commit bb435d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=http://localhost:8080
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ import java.util.UUID
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import scalajs.js

object Requests:
private val apiUrl = js.`import`.meta.env.VITE_API_URL.asInstanceOf[js.UndefOr[String]].toOption.getOrElse("")

private val backend: SttpBackend[Future, Any] = FetchBackend()

private val baseUrl = uri"http://localhost:8080/api"
private val baseUrl = uri"$apiUrl/api"

private given ExecutionContext = scala.concurrent.ExecutionContext.global

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ final class InvestigationView(investigationPage: Signal[Page.InvestigationPage])
case PinType.TelegramMessage =>
img(
cls("h-5 w-5"),
src("/static/img/telegram_logo.svg")
src("/img/telegram_logo.svg")
)
case PinType.Email =>
svg.svg(
Expand Down

0 comments on commit bb435d3

Please sign in to comment.