Merge branch 'version-2-contained-operators-test' of https://github.com/Frooodle/Stirling-PDF into version-2-contained-operators-test

This commit is contained in:
Felix Kaspar 2023-12-28 02:15:23 +01:00
commit f6e67e04da

@ -1,7 +1,7 @@
import Joi from 'joi';
import { PDFPage } from 'pdf-lib';
import { PdfFile, RepresentationType, JoiPdfFileSchema } from '../wrappers/PdfFile';
import { PdfFile, RepresentationType, JoiPDFFileSchema } from '../wrappers/PdfFileJoi';
const whSchema = Joi.string().custom((value, helpers) => {
console.log("value.pageSize", typeof value)
@ -23,7 +23,7 @@ const whSchema = Joi.string().custom((value, helpers) => {
});
export const ScalePageSchema = Joi.object({
file: JoiPdfFileSchema.required(),
file: JoiPDFFileSchema.required(),
pageSize: Joi.alternatives().try(whSchema, Joi.array().items(whSchema)).required(),
});
@ -86,4 +86,4 @@ export const PageSize = Object.freeze({
width: 612,
height: 792
}
});
});