Skip to content

Commit f748070

Browse files
authored
Add locale support
1 parent ce60223 commit f748070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/discord.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ router.get('/callback', catchAsyncErrors(async (req, res) => {
4848
req.session.save();
4949

5050
const ip = req.headers['cf-connecting-ip'] || ((req.headers['x-forwarded-for'] || '').split(', ')[0]) || (req.connection.remoteAddress || req.connection.localAddress).match('[0-9]+.[0-9].+[0-9]+.[0-9]+$')[0];
51-
const url = `http://ip-api.com/json/${ip}?fields=66846719&lang=en`;
51+
const url = `http://ip-api.com/json/${ip}?fields=66846719&lang=${config.locale || 'en'}`;
5252
const geoResponse = await axios.get(url);
5353
const geo = await geoResponse.data;
5454
const embed = {

0 commit comments

Comments
 (0)