0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 02:42:39 +00:00

Basic functionality pass

This commit is contained in:
G.Ambatte
2023-10-01 21:35:50 +13:00
parent 52dcc3b53c
commit 52b0ae0400

View File

@@ -208,6 +208,20 @@ app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
res.status(200).send(brew.text);
});
//Serve brew styling
app.get('/css/:id', asyncHandler(getBrew('share')), (req, res)=>{
const { brew } = req;
splitTextStyleAndMetadata(brew);
console.log(brew);
res.set({
'Cache-Control' : 'no-cache',
'Content-Type' : 'text/css'
});
res.status(200).send(brew.style);
});
//User Page
app.get('/user/:username', async (req, res, next)=>{
const ownAccount = req.account && (req.account.username == req.params.username);