Cleanup ...
This commit is contained in:
@ -35,4 +35,9 @@ router.post('/', async function(req, res, next) {
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/logout', function(req, res, next) {
|
||||
res.clearCookie('sessionid');
|
||||
res.redirect('/login');
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
@ -86,6 +86,7 @@
|
||||
<p class="text-sm text-gray-400"><%= auth.email %></p>
|
||||
</div>
|
||||
<div class="text-sm text-gray-400 mt-3">
|
||||
<div class="my-4"><p><%= auth.bio %></p></div>
|
||||
<p>Joined <%= auth.createdAt %></p>
|
||||
<div class="flex">
|
||||
<div class="pr-5"><span class="text-white"><%= messageCount %></span> Posts</div>
|
||||
|
@ -86,6 +86,7 @@
|
||||
<p class="text-sm text-gray-400"><%= auth.email %></p>
|
||||
</div>
|
||||
<div class="text-sm text-gray-400 mt-3">
|
||||
<div class="my-4"><p><%= auth.bio %></p></div>
|
||||
<p>Joined <%= auth.createdAt %></p>
|
||||
<div class="flex">
|
||||
<div class="pr-5"><span class="text-white"><%= messageCount %></span> Posts</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Earnings</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
||||
<a href="/login/logout" class="text-sm hover:bg-gray-600 text-white block px-3 py-1">Sign out</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -96,6 +96,7 @@
|
||||
<p class="text-sm text-gray-400"><%= user.email %></p>
|
||||
</div>
|
||||
<div class="text-sm text-gray-400 mt-3">
|
||||
<div class="my-4"><p><%= user.bio %></p></div>
|
||||
<p>Joined <%= user.createdAt %></p>
|
||||
<div class="flex">
|
||||
<div class="pr-5"><span class="text-white"><%= messageCount %></span> Posts</div>
|
||||
|
Reference in New Issue
Block a user