Renamed editMetadata to match V1 naming. Added Operations controller

This commit is contained in:
Saud Fatayerji
2023-11-11 18:35:33 +03:00
parent 2cb2116940
commit fd6b0740fd
8 changed files with 341 additions and 29 deletions

View File

@@ -0,0 +1,27 @@
import express, { Request, Response } from 'express';
export function respondWithBinaryPdf(res: Response, buffer: Uint8Array, filename: string) {
res.writeHead(200, {
'Content-Type': "application/pdf",
'Content-disposition': 'attachment;filename=' + filename,
'Content-Length': buffer.length
});
res.end(buffer)
}
export function response_mustHaveExactlyOneFile(res: Response): void {
res.status(400).send([
{
"message": "file is required",
"path": [
"pdfFile"
],
"type": "file",
"context": {
"label": "pdfFile",
"key": "pdfFile"
}
}
]);
}