0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 02:02:43 +00:00

Handle cached text

The NEW page saves to the browser LocalStorage the current text in case the user goes to a different page before saving. The new "import" function wasn't working since it was being overwritten by any cached values if they existed from an earlier "new" page.
This commit is contained in:
Trevor Buckner
2021-03-04 22:58:40 -05:00
parent 3358094319
commit 5b242989da
3 changed files with 1 additions and 4 deletions

View File

@@ -146,7 +146,6 @@ app.get('/edit/:id', (req, res, next)=>{
//New Page
app.get('/new/: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 shareId = req.params.id.slice(-12);