diff --git a/src/Service/service.schema.ts b/src/Service/service.schema.ts index 8afc265..9c43d74 100644 --- a/src/Service/service.schema.ts +++ b/src/Service/service.schema.ts @@ -47,15 +47,6 @@ export class ServiceSchema extends PothosSchema { }), commission: t.exposeFloat('commission', { description: 'The commission of the service.', - validate: (value) => { - if (value === undefined) { - return true - } - if (typeof value !== 'number' || value < 0 || value > 1) { - throw new Error('Commission must be between 0 and 1, eg: 0.05 for 5%') - } - return true - }, }), rating: t.expose('rating', { type: 'Float', @@ -75,7 +66,11 @@ export class ServiceSchema extends PothosSchema { resolve: async (service) => { // get file id from imageFileUrl const imageFileId = service.imageFileUrl?.split('/').pop()?.split('?')[0] - return await this.minioService.updatePresignUrl(imageFileId ?? '', 'files', service.imageFileUrl ?? undefined) + return await this.minioService.updatePresignUrl( + imageFileId ?? '', + 'files', + service.imageFileUrl ?? undefined, + ) }, }), status: t.expose('status', {