This commit is contained in:
azivner 2018-05-30 23:18:56 -04:00
parent bd66b8a1c8
commit 8bf4633cd0
2 changed files with 5 additions and 1 deletions

View file

@ -33,6 +33,10 @@ async function importToBranch(req) {
}
function toHtml(text) {
if (!text) {
return '';
}
return '<p>' + text.replace(/(?:\r\n|\r|\n)/g, '</p><p>') + '</p>';
}

View file

@ -56,7 +56,7 @@ async function load(req) {
const branchIds = req.body.branchIds;
if (branchIds && branchIds.length > 0) {
noteIds = (await sql.getColumn(`SELECT noteId FROM branches WHERE isDeleted = 0 AND branchId IN(???)`, branchIds))
noteIds = (await sql.getManyRows(`SELECT noteId FROM branches WHERE isDeleted = 0 AND branchId IN(???)`, branchIds))
.map(note => note.noteId);
}