filter ip

This commit is contained in:
Andris Reinman 2018-11-12 14:39:11 +02:00
parent 87dd69152d
commit e86ffa7c93

View file

@ -359,7 +359,7 @@ module.exports = (db, server, userHandler) => {
filter.ip = ip;
}
let total = await db.database.collection('authlog').countDocuments(filter);
let total = await db.users.collection('authlog').countDocuments(filter);
let opts = {
limit,
@ -535,7 +535,7 @@ module.exports = (db, server, userHandler) => {
let filter = { _id: event, user };
let eventData;
try {
eventData = await db.database.collection('authlog').findOne(filter);
eventData = await db.users.collection('authlog').findOne(filter);
} catch (err) {
res.json({
error: 'MongoDB Error: ' + err.message,