Upgrade dependencies
This commit is contained in:
parent
9ff832fb6f
commit
6973b2600c
@ -46,7 +46,7 @@
|
|||||||
"@types/ws": "^7.2.4",
|
"@types/ws": "^7.2.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
||||||
"@typescript-eslint/parser": "^4.2.0",
|
"@typescript-eslint/parser": "^4.2.0",
|
||||||
"concurrently": "^5.3.0",
|
"concurrently": "^6.0.0",
|
||||||
"eslint": "^7.9.0",
|
"eslint": "^7.9.0",
|
||||||
"jest": "^26.1.0",
|
"jest": "^26.1.0",
|
||||||
"maildev": "^1.1.0",
|
"maildev": "^1.1.0",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {IncomingForm} from "formidable";
|
import Formidable from "formidable";
|
||||||
import Middleware from "./Middleware";
|
import Middleware from "./Middleware";
|
||||||
import {NextFunction, Request, Response} from "express";
|
import {NextFunction, Request, Response} from "express";
|
||||||
import {FileError, ValidationBag} from "./db/Validator";
|
import {FileError, ValidationBag} from "./db/Validator";
|
||||||
|
|
||||||
export default abstract class FileUploadMiddleware extends Middleware {
|
export default abstract class FileUploadMiddleware extends Middleware {
|
||||||
protected abstract makeForm(): IncomingForm;
|
protected abstract makeForm(): Formidable;
|
||||||
|
|
||||||
protected abstract getDefaultField(): string;
|
protected abstract getDefaultField(): string;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ export const preventContextCorruptionMiddleware = (delegate: RequestHandler): Re
|
|||||||
) => {
|
) => {
|
||||||
const data = requestIdStorage.getStore() as string;
|
const data = requestIdStorage.getStore() as string;
|
||||||
|
|
||||||
delegate(req, res, (err?: Error | 'router') => {
|
delegate(req, res, (err?: unknown | 'router') => {
|
||||||
requestIdStorage.enterWith(data);
|
requestIdStorage.enterWith(data);
|
||||||
next(err);
|
next(err);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user