0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

log req account

This commit is contained in:
Víctor Losada Hernández
2024-12-14 21:01:38 +01:00
parent 5e5c637c79
commit a1c228b1d1

View File

@@ -277,6 +277,7 @@ app.get('/css/:id', asyncHandler(getBrew('share')), (req, res)=>{getCSS(req, res
//User Page
app.get('/user/:username', async (req, res, next)=>{
const ownAccount = req.account && (req.account.username == req.params.username);
console.log(req.account);
req.ogMeta = { ...defaultMetaTags,
title : `${req.params.username}'s Collection`,
@@ -348,6 +349,7 @@ app.get('/user/:username', async (req, res, next)=>{
//Change author name on brews
app.put('/api/user/rename', async (req, res) => {
console.log(req.account);
const { username, newUsername } = req.body;
console.log('renaming');