From 8241473b5b00573c608c9007a29ca674f4e85fd5 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Wed, 28 Aug 2024 15:56:32 +0200 Subject: [PATCH] Fix invalid api url for web --- .../kotlin/dev/schlaubi/tonbrett/app/api/Authentication.kt | 2 ++ build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/shared/src/jsMain/kotlin/dev/schlaubi/tonbrett/app/api/Authentication.kt b/app/shared/src/jsMain/kotlin/dev/schlaubi/tonbrett/app/api/Authentication.kt index bce147a..5e73f3f 100644 --- a/app/shared/src/jsMain/kotlin/dev/schlaubi/tonbrett/app/api/Authentication.kt +++ b/app/shared/src/jsMain/kotlin/dev/schlaubi/tonbrett/app/api/Authentication.kt @@ -36,5 +36,7 @@ actual open class AppContext : AppContextBase() { actual fun getUrl() = URLBuilder(window.location.href).apply { if (window.location.host.endsWith("discordsays.com")) { takeFrom("https://$appId.discordsays.com/.proxy/api/") + } else { + pathSegments = emptyList() } }.build() diff --git a/build.gradle.kts b/build.gradle.kts index 223e57a..54e4f12 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { allprojects { group = "dev.schlaubi.tonbrett" - version = "1.21.2" + version = "1.21.3" repositories { mavenCentral()