Skip to content

Commit 2ae620c

Browse files
committed
Passing country code and city through API
1 parent d35e558 commit 2ae620c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/api.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ if (cluster.isMaster) {
306306
{
307307
params.ip_address = params.qstring.ip_address || getIpAddress(req);
308308
params.user = {
309-
'country':'Unknown',
310-
'city':'Unknown'
309+
'country':params.qstring.country_code || 'Unknown',
310+
'city':params.qstring.city || 'Unknown'
311311
};
312312

313313
if (!params.qstring.app_key || !params.qstring.device_id) {
@@ -482,4 +482,4 @@ if (cluster.isMaster) {
482482
}
483483

484484
}).listen(common.config.api.port, common.config.api.host || '');
485-
}
485+
}

0 commit comments

Comments
 (0)