0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 16:02:38 +00:00

v2.10.1 - Fix brews lost on back button

This commit is contained in:
Trevor Buckner
2020-10-12 14:30:42 -04:00
parent 7f8f39916d
commit 77973f0037
5 changed files with 16 additions and 10 deletions

View File

@@ -117,6 +117,7 @@ app.get('/user/:username', async (req, res, next)=>{
//Edit Page
app.get('/edit/:id', (req, res, next)=>{
res.header('Cache-Control', 'no-cache, no-store'); //reload the latest saved brew when pressing back button, not the cached version before save.
if(req.params.id.length > 12) {
const googleId = req.params.id.slice(0, -12);
const editId = req.params.id.slice(-12);