aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FileRouter.ts8
-rw-r--r--src/logger.ts6
-rw-r--r--src/matcher/options.ts13
3 files changed, 9 insertions, 18 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index 53fc537..3f966c2 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -168,7 +168,7 @@ const getProperties: Middleware = (
const postProperties: Middleware = (
req: Request, res: Response, next: NextFunction
): void => {
- logger.debug('Editing server properties');
+ console.log('Editing server properties');
res.locals.modified = true;
for (const newProp of req.body) {
const prop: Property | undefined = serverConfig.find(
@@ -189,6 +189,7 @@ const postProperties: Middleware = (
return;
}
}
+ console.log("Posted Properties successfully");
next();
};
@@ -629,7 +630,8 @@ const postFilePath: Middleware = async(req: Request, res: Response, next: NextFu
// Sets final if requested
if (res.locals.file && qH.isFinal(req)) {
- res.locals.file.status = 'final';
+ res.locals.file.status = 'preprocessing';
+ // start file conversion
}
// Sets Metadata if requested
@@ -767,7 +769,7 @@ export class FileRouter {
// File access
this.router.get ('/projects/:project_name/files/:path', getFilePath);
this.router.post('/projects/:project_name/files/:path',
- upload.single('userfile'), postFilePath);
+ upload.single('userfile'), postFilePath);
this.router.get ('/projects/:project_name/files_by_id/:id', getFileId);
}
diff --git a/src/logger.ts b/src/logger.ts
index ba66650..bdd8fbc 100644
--- a/src/logger.ts
+++ b/src/logger.ts
@@ -143,7 +143,7 @@ const basicFileTransport: winston.TransportInstance =
silent: false,
colorize: false,
timestamp: true,
- filename: './logs/general/basic',//logPath('basic'),
+ filename: './logs/general/basic', //logPath('basic'),
maxSize: 1000000,
maxFiles: 100,
stream: undefined,
@@ -170,7 +170,7 @@ const criticalFileTransport: winston.TransportInstance =
silent: false,
colorize: false,
timestamp: true,
- filename: './logs/general/critical' ,//logPath('critical'),
+ filename: './logs/general/critical', //logPath('critical'),
maxSize: 1000000,
maxFiles: 10,
stream: undefined,
@@ -198,7 +198,7 @@ const queryFileTransport: winston.TransportInstance =
silent: false,
colorize: false,
timestamp: true,
- filename: './logs/general/queries',//logPath('queries'),
+ filename: './logs/general/queries', //logPath('queries'),
maxSize: 1000000,
maxFiles: 100,
stream: undefined,
diff --git a/src/matcher/options.ts b/src/matcher/options.ts
index 967a6f9..62e4985 100644
--- a/src/matcher/options.ts
+++ b/src/matcher/options.ts
@@ -15,20 +15,13 @@ export type Value =
const matchNoCurry:
(template: TemplateValue, value: Value | undefined) => boolean =
(template: TemplateValue, value: Value | undefined): boolean => {
- console.log("matchNoCurry()")
- console.log(template)
- console.log(value)
if (types.atom(template)) {
- console.log("atom")
return template === value;
} else if (types.function(template)) {
- console.log("function")
return template(value);
} else if (types.atom(value) || value === undefined) {
- console.log("atom2")
return false;
} else if (types.object(template)) {
- console.log("object")
return Object.keys(template)
.every((key: string): boolean => {
const v: Value | undefined = value[key];
@@ -41,11 +34,7 @@ const matchNoCurry:
// tslint:disable-next-line:typedef
export const match = (template: TemplateValue, value?: Value) => {
- console.log("match()")
- console.log(template)
- console.log(value)
if (value === undefined) {
- console.log("is undefined")
return matchNoCurry.bind(null, template);
}
return matchNoCurry(template, value);
@@ -96,7 +85,7 @@ export const array = (template: TemplateValue, values?: Value[]) => {
const m: Checker = types.function(template)
? template
: match.bind(null, template);
- return values.every(m); //
+ return values.every(m);
};
// tslint:disable-next-line:typedef