fix(shared-operations): JoiPDFFileSchema import typo

This commit is contained in:
sbplat 2023-12-27 19:59:43 -05:00
parent 8d9c24b09b
commit 51ca8ac7fc

View File

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