diff --git a/changelog.md b/changelog.md index 4ffb9a2..544cf38 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ - Homebrewery will now try and onsert a good title for your brew if you don't provide one - Homebrewery now re-renders properly when you zoom - Fixed the noteblock overlapping into titles (thanks u/dsompura!) +- Fixed a bad search route in the admin panel (thanks u/SnappyTom!) ### Friday, 29/07/2016 - v2.2.7 diff --git a/client/admin/homebrewAdmin/homebrewAdmin.jsx b/client/admin/homebrewAdmin/homebrewAdmin.jsx index c6a7ddb..6397f1b 100644 --- a/client/admin/homebrewAdmin/homebrewAdmin.jsx +++ b/client/admin/homebrewAdmin/homebrewAdmin.jsx @@ -28,7 +28,7 @@ var HomebrewAdmin = React.createClass({ fetchBrews : function(page){ - request.get('/homebrew/api/search') + request.get('/api/search') .query({ admin_key : this.props.admin_key, count : this.state.count, diff --git a/server/homebrew.api.js b/server/homebrew.api.js index a21ff79..2e031b6 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -107,6 +107,7 @@ module.exports = function(app){ app.get('/api/search', mw.adminOnly, function(req, res){ + var page = req.query.page || 0; var count = req.query.count || 20;