spiele editierbar
This commit is contained in:
parent
0561a59ac2
commit
e8c9d2574f
2
app.js
2
app.js
|
@ -589,7 +589,7 @@ app.get('/login', (req, res) => {
|
|||
});
|
||||
|
||||
app.get('/register', (req, res) => {
|
||||
res.render('register'); // Stelle sicher, dass es eine register.ejs gibt
|
||||
res.render('register', {session: req.session}); // Stelle sicher, dass es eine register.ejs gibt
|
||||
});
|
||||
|
||||
app.get('/spiele', async (req, res) => {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
|
||||
<% if (session && ( session.role =='admin' || session.role =='user' )) { %>
|
||||
<% if (session) { if ( session.role =='admin' || session.role =='user' ) { %>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">Trainings</a>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<a class="nav-link" href="/profile">Profil</a>
|
||||
</li>
|
||||
|
||||
<% } %>
|
||||
<% }} %>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/spiele">Spiele</a>
|
||||
|
|
Loading…
Reference in New Issue