Skip to content

Commit

Permalink
Update apiConfig.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuschelCGN authored Jan 8, 2024
1 parent 21453cf commit 4e3f8ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/routes/apiConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { version } = require('../../package.json')

module.exports = async (fastify, options, next) => {
module.exports = async (fastify, options) => {
fastify.get('/api/config/poracleWeb', 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 Down Expand Up @@ -72,6 +72,4 @@ module.exports = async (fastify, options, next) => {
telegram: Object.fromEntries(typesForPlatform('telegram').map((x) => [x, Object.fromEntries(languagesForType('telegram', x).map((y) => [y, templatesForLanguage('telegram', x, y)]))])),
}
})

next()
}

0 comments on commit 4e3f8ed

Please sign in to comment.