do not use fields

This commit is contained in:
Andris Reinman 2018-09-20 11:28:43 +03:00
parent 208ebb90e5
commit 224c76f869
6 changed files with 8 additions and 8 deletions

View file

@ -203,7 +203,7 @@ module.exports = (db, server) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}

View file

@ -365,7 +365,7 @@ module.exports = (db, server, userHandler) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}

View file

@ -155,7 +155,7 @@ module.exports = (db, server) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}

View file

@ -151,7 +151,7 @@ module.exports = (db, server) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}

View file

@ -467,7 +467,7 @@ module.exports = (db, server, messageHandler) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}
@ -920,7 +920,7 @@ module.exports = (db, server, messageHandler) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}
@ -2692,7 +2692,7 @@ module.exports = (db, server, messageHandler) => {
if (pageNext) {
opts.next = pageNext;
} else if (page > 1 && pagePrevious) {
} else if ((!page || page > 1) && pagePrevious) {
opts.previous = pagePrevious;
}

View file

@ -432,7 +432,7 @@ class MessageHandler {
let queryOpts = {};
if (options.skipExisting) {
// no need to load extra data when we only need to know the basics
queryOpts.fields = {
queryOpts.projection = {
_id: true,
uid: true,
outbound: true,