Fixes related to servlet-context

This commit is contained in:
Simon Brooke 2018-07-22 09:44:58 +01:00
parent b7ddc0a443
commit ea89e37d77
2 changed files with 13 additions and 5 deletions

View file

@ -1,9 +1,15 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block big-links %} {% block big-links %}
<div class="big-link-container"> <div class="big-link-container">
<a href="{{servlet-context}}/profile" class="big-link" id="profile-link">Your&nbsp;profile</a> <a href="{{servlet-context}}/profile"
class="big-link" id="profile-link">Your&nbsp;profile</a>
</div> </div>
<div class="big-link-container"> <div class="big-link-container">
<a href="{{servlet-context}}/app" class="big-link" id="app-link">App</a> <a href="{{servlet-context}}/app"
class="big-link" id="app-link">App</a>
</div>
<div class="big-link-container">
<a href="https://steamie.projecthope.scot/"
class="big-link" id="app-link">Steamie</a>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -79,7 +79,9 @@
username (:username params) username (:username params)
user (if username (db-core/get-canvasser-by-username db-core/*db* {:username username})) user (if username (db-core/get-canvasser-by-username db-core/*db* {:username username}))
password (:password params) password (:password params)
redirect-to (or (:redirect-to params) "roles")] redirect-to (or
(:redirect-to params)
(str (:servlet-context request) "/roles"))]
(cond (cond
(:authority params) (:authority params)
(let [auth (oauth/authority! (:authority params))] (let [auth (oauth/authority! (:authority params))]
@ -126,7 +128,7 @@
(POST "/call-me" request (call-me-page request)) (POST "/call-me" request (call-me-page request))
(GET "/login" request (login-page request)) (GET "/login" request (login-page request))
(POST "/login" request (login-page request)) (POST "/login" request (login-page request))
(GET "/notyet" [] (layout/render "notyet.html" {} (GET "/notyet" [] (layout/render "notyet.html"
{:title "Can we persuade you?"})) {:title "Can we persuade you?"}))
(GET "/supporter" [] (layout/render "supporter.html" {} (GET "/supporter" [] (layout/render "supporter.html"
{:title "Have you signed up as a canvasser yet?"}))) {:title "Have you signed up as a canvasser yet?"})))