commit 131340cb83afa5a10dfb8a36da1b685a6e5b5e7d
parent f23ba0cc186099898dbbca0bca44bd6130312f95
Author: MS <ms@taler.net>
Date: Thu, 22 Dec 2022 15:57:46 +0100
Remove i18n workaroud.
Its problem was to catch ANY path without a handler,
resulting in hiding appropriate 404 errors. This workaround
was introduced when Sandbox used to serve the UI.
Diffstat:
3 files changed, 23 insertions(+), 32 deletions(-)
diff --git a/nexus/src/test/kotlin/CircuitApiTest.kt b/nexus/src/test/kotlin/CircuitApiTest.kt
@@ -1,20 +0,0 @@
-import io.ktor.client.features.*
-import io.ktor.client.features.get
-import io.ktor.client.request.*
-import io.ktor.server.testing.*
-import kotlinx.coroutines.runBlocking
-import org.junit.Test
-import tech.libeufin.sandbox.sandboxApp
-
-class CircuitApiTest {
- // Get /config
- @Test
- fun config() {
- withTestApplication(sandboxApp) {
- runBlocking {
- val r: String = client.get("/demobanks/default/circuit-api/config")
- println(r)
- }
- }
- }
-}
-\ No newline at end of file
diff --git a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
@@ -0,0 +1,22 @@
+import io.ktor.client.features.*
+import io.ktor.client.features.get
+import io.ktor.client.request.*
+import io.ktor.server.testing.*
+import kotlinx.coroutines.runBlocking
+import org.junit.Test
+import tech.libeufin.sandbox.sandboxApp
+
+class SandboxCircuitApiTest {
+ // Get /config
+ @Test
+ fun config() {
+ withSandboxTestDatabase {
+ withTestApplication(sandboxApp) {
+ runBlocking {
+ val r: String = client.get("/demobanks/default/circuit-api/config33")
+ println(r)
+ }
+ }
+ }
+ }
+}
+\ No newline at end of file
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -1071,17 +1071,6 @@ val sandboxApp: Application.() -> Unit = {
return@get
}
- /**
- * Requests falling here may only be generated by links
- * defined after the Python bank. This redirect is a workaround
- * to avoid 404.
- */
- get("/demobanks/{demobankid}/{lang?}/{register?}") {
- val demobankId = ensureNonNull(call.parameters["demobankid"])
- var url = "${call.request.getBaseUrl()}demobanks/$demobankId"
- call.respondRedirect(url,true)
- return@get
- }
get("/demobanks/{demobankid}") {
val demobank = ensureDemobank(call)
expectAdmin(call.request.basicAuth())