gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: move demobank check at a earlier step


From: gnunet
Subject: [libeufin] branch master updated: move demobank check at a earlier step
Date: Tue, 21 Dec 2021 08:29:04 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 54e9a625 move demobank check at a earlier step
54e9a625 is described below

commit 54e9a6254dd34acb3fdf3eceaacf71f92318787f
Author: ms <ms@taler.net>
AuthorDate: Tue Dec 21 08:28:26 2021 +0100

    move demobank check at a earlier step
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index b2dd5a93..6e6e4523 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -954,6 +954,8 @@ val sandboxApp: Application.() -> Unit = {
         }
 
         get("/demobanks/{demobankid}") {
+            val demobank = ensureDemobank(call)
+
             /**
              * Respond the SPA if the content type is not "application/json".
              */
@@ -975,13 +977,7 @@ val sandboxApp: Application.() -> Unit = {
                 return@get
             }
             expectAdmin(call.request.basicAuth())
-            val demobankId = call.getUriComponent("demobankid")
-            val ret: DemobankConfigEntity = transaction {
-                DemobankConfigEntity.find {
-                    DemobankConfigsTable.name eq demobankId
-                }.firstOrNull()
-            } ?: throw notFound("Demobank ${demobankId} not found")
-            call.respond(getJsonFromDemobankConfig(ret))
+            call.respond(getJsonFromDemobankConfig(demobank))
             return@get
         }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]