From 4e872fad71f9c868310fd906e615d5a7fe40e4eb Mon Sep 17 00:00:00 2001 From: filipenevola Date: Sat, 13 Apr 2024 12:19:34 -0400 Subject: [PATCH] group-call-002 - test if lefthook will use prettier to format my code --- group-call-002/TicketFilters.js | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/group-call-002/TicketFilters.js b/group-call-002/TicketFilters.js index 4466d9d..a9728c4 100644 --- a/group-call-002/TicketFilters.js +++ b/group-call-002/TicketFilters.js @@ -1,37 +1,37 @@ export const TicketFilters = { - BY_NAME: { - propName: 'eventName', - isRequired: false, - execute({query: {eventName}, event}) { - return !eventName || event.eventName.includes(eventName); - }, + BY_NAME: { + propName: "eventName", + isRequired: false, + execute({ query: { eventName }, event }) { + return !eventName || event.eventName.includes(eventName); }, - BY_DATE: { - propName: 'eventDate', - isRequired: false, - execute({query: {eventDate}, event}) { - return !eventDate || event.eventDate === eventDate; - }, + }, + BY_DATE: { + propName: "eventDate", + isRequired: false, + execute({ query: { eventDate }, event }) { + return !eventDate || event.eventDate === eventDate; }, - BY_QUANTITY: { - propName: 'quantity', - isRequired: true, - execute({query: {quantity}, event}) { - return !quantity || event.quantity >= quantity; - }, + }, + BY_QUANTITY: { + propName: "quantity", + isRequired: true, + execute({ query: { quantity }, event }) { + return !quantity || event.quantity >= quantity; }, - BY_STATUS: { - propName: 'status', - isRequired: false, - execute({query: {status}, event}) { - return !status || event.eventStatus === status; - }, + }, + BY_STATUS: { + propName: "status", + isRequired: false, + execute({ query: { status }, event }) { + return !status || event.eventStatus === status; }, - BY_USER_VIP: { - propName: 'quantity', - isRequired: false, - execute({event, user}) { - return user?.isVIP || !event.onlyVIPUsers; - }, + }, + BY_USER_VIP: { + propName: "quantity", + isRequired: false, + execute({ event, user }) { + return user?.isVIP || !event.onlyVIPUsers; }, + }, };