0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

adjust frontend error handling, add client/server mismatch middleware

This commit is contained in:
Charlie Humphreys
2023-01-06 21:29:21 -06:00
parent 67a76f9d86
commit 385bee964d
12 changed files with 221 additions and 297 deletions

View File

@@ -336,6 +336,7 @@ If you believe you should have access to this brew, ask the file owner to invite
}
};
router.use('/api', require('./middleware.js').versionMismatch);
router.post('/api', asyncHandler(api.newBrew));
router.put('/api/:id', asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));
router.put('/api/update/:id', asyncHandler(api.getBrew('edit', true)), asyncHandler(api.updateBrew));