From b8b24a97f02013bbd5adecad07a9e019777a2a95 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 23 Apr 2018 00:33:26 +0100 Subject: Start introduction of preprocessing --- src/FileRouter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/FileRouter.ts') 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(); -- cgit v1.2.1