wrong isIP condition, should be for raw not single

merge-requests/341/head
Thomas Lynch 2 years ago
parent 17c9d098a5
commit e77aaffaa0
  1. 8
      db/posts.js

@ -554,13 +554,13 @@ module.exports = {
if (ip != null) {
if (isIP(ip)) {
query['$or'] = [
{ 'ip.single': ip },
{ 'globalreports.ip.single': ip }
{ 'ip.raw': ip },
{ 'globalreports.ip.raw': ip }
];
} else {
query['$or'] = [
{ 'ip.raw': ip },
{ 'globalreports.ip.raw': ip }
{ 'ip.single': ip },
{ 'globalreports.ip.single': ip }
];
}
}

Loading…
Cancel
Save