Skip to content

Commit

Permalink
Update apiMasterData.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuschelCGN authored Jan 8, 2024
1 parent a47b1f4 commit a426c5f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/routes/apiMasterData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = async (fastify, options, next) => {
module.exports = async (fastify, options) => {
fastify.get('/api/masterdata/grunts', options, async (req) => {
fastify.logger.info(`API: ${req.ip} ${req.routeOptions.method} ${req.routeOptions.url}`)
if (fastify.config.server.ipWhitelist.length && !fastify.config.server.ipWhitelist.includes(req.ip)) return { webserver: 'unhappy', reason: `ip ${req.ip} not in whitelist` }
Expand All @@ -24,6 +24,4 @@ module.exports = async (fastify, options, next) => {

return fastify.GameData.monsters
})

next()
}

0 comments on commit a426c5f

Please sign in to comment.