This commit is contained in:
Andris Reinman 2020-11-18 18:19:56 +02:00
parent 5d3f99492f
commit b26d97bc13
4 changed files with 5 additions and 3 deletions

View file

@ -284,6 +284,7 @@ paths:
- name: query
in: query
description: Prefix of an address or a name
required: true
schema:
type: string
- name: limit

View file

@ -1083,7 +1083,7 @@ module.exports = (db, server, userHandler) => {
const schema = Joi.object().keys({
user: Joi.string().hex().lowercase().length(24).required(),
query: Joi.string().trim().empty('').max(255),
query: Joi.string().trim().empty('').max(255).required(),
limit: Joi.number().default(20).min(1).max(250),
sess: sessSchema,
ip: sessIPSchema

View file

@ -164,7 +164,8 @@ class MessageHandler {
address: addr.address,
addrview: addr.addrview
}
}
},
{ upsert: true, projection: { _id: true } }
);
}
} catch (err) {

View file

@ -1,6 +1,6 @@
{
"name": "wildduck",
"version": "1.31.0",
"version": "1.31.1",
"description": "IMAP/POP3 server built with Node.js and MongoDB",
"main": "server.js",
"scripts": {