Browse Source

fixed missing user name issue

pull/2/head
Spocke 6 years ago
parent
commit
4ca16349c6
  1. 2
      index.js
  2. 2
      views/editor.mustache

2
index.js

@ -36,7 +36,7 @@ const setupRoutes = (app) => {
app.get('/editor', (req, res) => { app.get('/editor', (req, res) => {
if (req.session.user) { if (req.session.user) {
res.render('editor', { apiKey: config.apiKey, username: req.session.user.name });
res.render('editor', { apiKey: config.apiKey, fullname: req.session.user.fullname });
} else { } else {
res.redirect('/'); res.redirect('/');
} }

2
views/editor.mustache

@ -9,7 +9,7 @@
<body> <body>
<div class="container mt-3 mb-3"> <div class="container mt-3 mb-3">
<h1 class="h3 mb-4">Welcome {{username}} <a class="btn btn-link" href="/logout">Logout</a></h1>
<h1 class="h3 mb-4">Welcome {{fullname}} <a class="btn btn-link" href="/logout">Logout</a></h1>
<p>TinyMCE editor instance setup with Tiny Drive integated into the link, image and media dialogs and with a separate direct insertfile button.</p> <p>TinyMCE editor instance setup with Tiny Drive integated into the link, image and media dialogs and with a separate direct insertfile button.</p>
<textarea></textarea> <textarea></textarea>
</div> </div>

Loading…
Cancel
Save