|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
const { Modlogs } = require(__dirname+'/../../../db/') |
|
|
|
const { Modlogs } = require(__dirname+'/../../../db/') |
|
|
|
, pageQueryConverter = require(__dirname+'/../../../helpers/pagequeryconverter.js') |
|
|
|
, pageQueryConverter = require(__dirname+'/../../../helpers/pagequeryconverter.js') |
|
|
|
|
|
|
|
, decodeQueryIP = require(__dirname+'/../../../helpers/decodequeryip.js') |
|
|
|
, limit = 50; |
|
|
|
, limit = 50; |
|
|
|
|
|
|
|
|
|
|
|
module.exports = async (req, res, next) => { |
|
|
|
module.exports = async (req, res, next) => { |
|
|
@ -17,6 +18,10 @@ module.exports = async (req, res, next) => { |
|
|
|
if (uri && !Array.isArray(uri)) { |
|
|
|
if (uri && !Array.isArray(uri)) { |
|
|
|
filter.board = uri; |
|
|
|
filter.board = uri; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const ipMatch = decodeQueryIP(req.query); |
|
|
|
|
|
|
|
if (ipMatch) { |
|
|
|
|
|
|
|
filter.ip = ipMatch; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let logs, maxPage; |
|
|
|
let logs, maxPage; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -36,6 +41,7 @@ module.exports = async (req, res, next) => { |
|
|
|
queryString, |
|
|
|
queryString, |
|
|
|
username, |
|
|
|
username, |
|
|
|
uri, |
|
|
|
uri, |
|
|
|
|
|
|
|
ip: ipMatch ? req.query.ip : null, |
|
|
|
logs, |
|
|
|
logs, |
|
|
|
page, |
|
|
|
page, |
|
|
|
maxPage, |
|
|
|
maxPage, |
|
|
|