fixed broken api method to delete messages

This commit is contained in:
Andris Reinman 2018-09-03 08:51:32 +03:00
parent ad7b7dc987
commit 8ed0c80fb5
2 changed files with 6 additions and 2 deletions

View file

@ -36,9 +36,12 @@ function send() {
},
headers: {
/*
// uncomment to send the messge to Junk
'X-Rspamd-Bar': '/',
'X-Rspamd-Report': 'R_PARTS_DIFFER(0.5) MIME_GOOD(-0.1) R_DKIM_ALLOW(-0.2) R_SPF_ALLOW(-0.2)',
'X-Rspamd-Score': '22.6'
*/
},
from: 'Kärbes 🐧 <andris@kreata.ee>',

View file

@ -1,5 +1,7 @@
'use strict';
// TODO: finish converting methods to async..await with ACL
const config = require('wild-config');
const log = require('npmlog');
const Joi = require('../joi');
@ -1810,7 +1812,7 @@ module.exports = (db, server, messageHandler) => {
}
if (moveTo) {
let result, info;
let info;
try {
let data = await moveMessage({
user,
@ -1819,7 +1821,6 @@ module.exports = (db, server, messageHandler) => {
updates: result.value,
messageQuery
});
result = data.result;
info = data.info;
} catch (err) {
res.json({