syncification

This commit is contained in:
zadam
2020-06-20 12:31:38 +02:00
parent 30062d687f
commit 88348c560c
97 changed files with 1673 additions and 1700 deletions

View File

@@ -5,8 +5,8 @@ const html = require('html');
const utils = require('../utils');
const mdService = require('./md');
async function exportSingleNote(taskContext, branch, format, res) {
const note = await branch.getNote();
function exportSingleNote(taskContext, branch, format, res) {
const note = branch.getNote();
if (note.type === 'image' || note.type === 'file') {
return [400, `Note type ${note.type} cannot be exported as single file.`];
@@ -18,7 +18,7 @@ async function exportSingleNote(taskContext, branch, format, res) {
let payload, extension, mime;
let content = await note.getContent();
let content = note.getContent();
if (note.type === 'text') {
if (format === 'html') {
@@ -60,4 +60,4 @@ async function exportSingleNote(taskContext, branch, format, res) {
module.exports = {
exportSingleNote
};
};