api: Add baseUrl to templates
This commit is contained in:
parent
5b4ec4d69e
commit
46466874da
|
@ -53,6 +53,7 @@ function isValidScope(scope) {
|
|||
router.use((req, res, next) => {
|
||||
res.locals.user = req.user;
|
||||
res.locals.mainFrontendUrl = config.mainFrontendUrl;
|
||||
res.locals.baseUrl = baseUrl;
|
||||
next();
|
||||
});
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ block content
|
|||
minutes time for your decision.
|
||||
|
||||
.authorization
|
||||
form(method="post", action="/authorize/decline")
|
||||
form(method="post", action="authorize/decline")
|
||||
button(type="submit", class="red") Decline
|
||||
|
||||
form(method="post", action="/authorize/approve")
|
||||
form(method="post", action="authorize/approve")
|
||||
button(type="submit", class="green") Approve
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
html
|
||||
head
|
||||
base(href=baseUrl)
|
||||
title
|
||||
block title
|
||||
| Authorization Server
|
||||
|
@ -133,10 +134,10 @@ html
|
|||
if mainFrontendUrl
|
||||
li: a(href=mainFrontendUrl) Back to Portal
|
||||
if !user
|
||||
li: a(href="/login") Login
|
||||
li: a(href="/register") Register
|
||||
li: a(href="login") Login
|
||||
li: a(href="register") Register
|
||||
if user
|
||||
li: a(href="/logout") Logout
|
||||
li: a(href="logout") Logout
|
||||
header: h1
|
||||
block title
|
||||
block content
|
||||
|
|
|
@ -17,4 +17,4 @@ block content
|
|||
p.message.error Invalid login credentials, please try again.
|
||||
|
||||
button(type="submit", style="margin-right: 2rem") Login
|
||||
a(href="/forgot-password") I forgot my password
|
||||
a(href="forgot-password") I forgot my password
|
||||
|
|
|
@ -4,5 +4,5 @@ block title
|
|||
| Logout
|
||||
|
||||
block content
|
||||
form(method="post", action="/logout")
|
||||
form(method="post", action="logout")
|
||||
button(type="submit", class="red") Log out now
|
||||
|
|
|
@ -8,4 +8,4 @@ block content
|
|||
div(class="message " + type)= description
|
||||
|
||||
if showLoginButton
|
||||
p: a(href="/login") Go to login
|
||||
p: a(href="login") Go to login
|
||||
|
|
Loading…
Reference in a new issue