refactor exportcontext to taskcontext

This commit is contained in:
zadam
2019-10-18 22:27:38 +02:00
parent 157bd3816d
commit 56e4f4f5ac
9 changed files with 37 additions and 93 deletions

View File

@@ -5,7 +5,7 @@ const html = require('html');
const utils = require('../utils');
const mdService = require('./md');
async function exportSingleNote(exportContext, branch, format, res) {
async function exportSingleNote(taskContext, branch, format, res) {
const note = await branch.getNote();
if (note.type === 'image' || note.type === 'file') {
@@ -54,8 +54,8 @@ async function exportSingleNote(exportContext, branch, format, res) {
res.send(payload);
exportContext.increaseProgressCount();
exportContext.exportFinished();
taskContext.increaseProgressCount();
taskContext.taskSucceeded();
}
module.exports = {