mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 11:32:39 +00:00
Basic functionality pass
This commit is contained in:
@@ -208,6 +208,20 @@ app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
|
|||||||
res.status(200).send(brew.text);
|
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
|
//User Page
|
||||||
app.get('/user/:username', async (req, res, next)=>{
|
app.get('/user/:username', async (req, res, next)=>{
|
||||||
const ownAccount = req.account && (req.account.username == req.params.username);
|
const ownAccount = req.account && (req.account.username == req.params.username);
|
||||||
|
|||||||
Reference in New Issue
Block a user