gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Remove commented-out and likely dead c


From: gnunet
Subject: [libeufin] branch master updated: Remove commented-out and likely dead code.
Date: Wed, 29 Sep 2021 17:41:27 +0200

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 d3e2d17  Remove commented-out and likely dead code.
d3e2d17 is described below

commit d3e2d17b42549fe4ab365336d5d056dda8731454
Author: ms <ms@taler.net>
AuthorDate: Wed Sep 29 17:40:30 2021 +0200

    Remove commented-out and likely dead code.
---
 .../src/main/kotlin/tech/libeufin/sandbox/Main.kt  | 96 +---------------------
 1 file changed, 1 insertion(+), 95 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index ad90770..5848d44 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -34,7 +34,6 @@ import io.ktor.routing.get
 import io.ktor.routing.post
 import io.ktor.routing.routing
 import io.ktor.server.engine.embeddedServer
-import io.ktor.server.netty.Netty
 import org.jetbrains.exposed.sql.*
 import org.jetbrains.exposed.sql.transactions.transaction
 import io.ktor.jackson.jackson
@@ -69,6 +68,7 @@ import io.ktor.auth.*
 import io.ktor.http.*
 import io.ktor.http.content.*
 import io.ktor.request.*
+import io.ktor.server.netty.*
 import io.ktor.util.date.*
 import kotlinx.coroutines.newSingleThreadContext
 import 
org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
@@ -473,100 +473,6 @@ fun serverMain(dbName: String, port: Int) {
             }
         }
         routing {
-            /*
-
-              FIXME: commenting out until a solution for i18n is found.
-
-            get("/bank") {
-                val ret = renderTemplate(
-                    "login.html",
-                    mapOf("csrf_token" to "todo", )
-                )
-                call.respondText(ret)
-                return@get
-            } */
-
-            /*
-              FIXME: not implemented.
-
-            post("/register") {
-                // how to read form-POSTed values?
-                val username = "fixme"
-                val password = "fixme"
-                val superuser = false
-
-                transaction {
-                    // check if username is taken.
-                    val maybeUser = SandboxUserEntity.find {
-                        SandboxUsersTable.username eq username
-                    }.firstOrNull()
-                    // Will be converted to a HTML response.
-                    if (maybeUser != null) throw SandboxError(
-                        HttpStatusCode.Conflict, "Username not available"
-                    )
-
-                    // username is valid.  Register the user + new bank 
account.
-                    SandboxUserEntity.new {
-                        this.username = username
-                        passwordHash = CryptoUtil.hashpw(password)
-                        this.superuser = superuser
-                        bankAccount = BankAccountEntity.new {
-                            iban = "fixme"
-                            bic = "fixme"
-                            name = "fixme"
-                            label = "fixme"
-                            currency = "fixme"
-                        }
-                    }
-                }
-
-                call.respondText("User $username created")
-                return@post
-            }
-
-             */
-
-            /*
-            FIXME: will likely be replaced by the Single Page Application
-
-            get("/jinja-test") {
-                val template = Resources.toString(
-                    Resources.getResource("templates/hello.html"),
-                    Charsets.UTF_8
-                )
-                val context = mapOf("token" to "dynamic")
-                val page = Jinjava().render(template, context)
-                call.respond(page)
-                return@get
-            }
-
-             */
-
-            /*
-
-            FIXME: not used
-
-            authenticate("auth-form") {
-                get("/profile") {
-                    val userSession = call.principal<UserIdPrincipal>()
-                    println("Welcoming ${userSession?.name}")
-                    call.respond(object {})
-                    return@get
-                }
-            }
-
-             */
-
-            /*
-            FIXME: not used
-
-            static("/static") {
-                /**
-                 * Here Sandbox will serve the CSS files.
-                 */
-                resources("static")
-            }
-             */
 
             get("/") {
                 call.respondText("Hello, this is Sandbox\n", 
ContentType.Text.Plain)

-- 
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]