aboutsummaryrefslogtreecommitdiff
path: root/src/FileRouter.ts
diff options
context:
space:
mode:
authorTom Harley2018-04-23 00:33:26 +0100
committerTom Harley2018-04-23 00:33:26 +0100
commitb8b24a97f02013bbd5adecad07a9e019777a2a95 (patch)
treeecb9847f03f25ef27fe02a6103d9cd0f05dab07d /src/FileRouter.ts
parentMerge branch 'trh/gets' of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/projec... (diff)
downloadmedicine-b8b24a97f02013bbd5adecad07a9e019777a2a95.tar.gz
medicine-b8b24a97f02013bbd5adecad07a9e019777a2a95.zip

Start introduction of preprocessing

Diffstat (limited to 'src/FileRouter.ts')
-rw-r--r--src/FileRouter.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index 8896e47..bb022d3 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -9,7 +9,7 @@ import * as bodyParser from 'body-parser';
import { RequestError } from './errors/errorware';
import { NextFunction, Request, Response, Router } from 'express';
import { View, addSubFileToFolder, copyFile, createProjectFolder, deleteFile,
- saveFile, views } from './files';
+ saveFile, views, preprocess } from './files';
import { appendFileSync } from 'fs';
import { logger } from './logger';
import { mimetype } from './mimetype';
@@ -921,7 +921,7 @@ const postFilePath: Middleware = async(
if (req.query.final) {
res.locals.file.status = 'preprocessing';
await res.locals.file.save();
- // Start file preprocesssing
+ preprocess(res.locals.file, res.locals.project);
}
} else {
logger.warn('overwriting without truncating not supported');
@@ -965,7 +965,7 @@ const postFilePath: Middleware = async(
// Sets final if requested
if (qH.isFinal(req)) {
res.locals.file.status = 'preprocessing';
- // TODO Start file preprocessing
+ preprocess(res.locals.file, res.locals.project);
}
}
await res.locals.file.save();