diff options
author | Marvin Borner | 2019-04-18 22:08:26 +0200 |
---|---|---|
committer | Marvin Borner | 2019-04-18 22:08:26 +0200 |
commit | 551868000825ebbe037b1be494679b24c2f0fcac (patch) | |
tree | d280dcd86b3417a7bf3fcfc6b74d5c44484b4f77 /src/main/kotlin/App.kt | |
parent | 8c85eef4dd56b6a2d4a2563c5634dc2c60a35370 (diff) |
Added better setup process redirection
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/kotlin/App.kt')
-rw-r--r-- | src/main/kotlin/App.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/App.kt b/src/main/kotlin/App.kt index 3967d80..f081bea 100644 --- a/src/main/kotlin/App.kt +++ b/src/main/kotlin/App.kt @@ -56,7 +56,7 @@ fun main() { * Renders the login page */ get("/login", { ctx -> - if (userHandler.getVerifiedUserId(ctx) > 0) ctx.redirect("/") + if (userHandler.getVerifiedUserId(ctx) > 0 || !databaseController.isSetup()) ctx.redirect("/") else ctx.render( "login.rocker.html", model("message", "", "counter", 0) @@ -77,7 +77,7 @@ fun main() { * Renders the setup page (only on initial use) */ get("/setup", { ctx -> - if (databaseController.isSetup()) ctx.redirect("/") + if (databaseController.isSetup()) ctx.redirect("/login") else ctx.render( "setup.rocker.html", model("message", "") |