File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,8 +271,6 @@ export default class CalendarService {
271271 zoomLink ?: string ,
272272 description ?: string
273273 ) : Promise < Event > {
274- if ( ! title . trim ( ) ) throw new HttpException ( 400 , 'Title cannot be only whitespace' ) ;
275-
276274 // Validate eventTypeId
277275 const foundEventType = await prisma . event_Type . findUnique ( {
278276 where : { eventTypeId }
@@ -594,8 +592,6 @@ export default class CalendarService {
594592 zoomLink ?: string ,
595593 description ?: string
596594 ) : Promise < Event > {
597- if ( ! title . trim ( ) ) throw new HttpException ( 400 , 'Title cannot be only whitespace' ) ;
598-
599595 // validate eventId
600596 const foundEvent = await prisma . event . findUnique ( {
601597 where : { eventId } ,
Original file line number Diff line number Diff line change @@ -23,9 +23,8 @@ export const decimalMinZero = (validationObject: ValidationChain): ValidationCha
2323 . withMessage ( 'Value must be greater than or equal to zero' ) ;
2424} ;
2525
26- //Const to return if an input is a string and is not empty
2726export const nonEmptyString = ( validationObject : ValidationChain ) : ValidationChain => {
28- return validationObject . isString ( ) . not ( ) . isEmpty ( ) ;
27+ return validationObject . isString ( ) . not ( ) . isEmpty ( { ignore_whitespace : true } ) ;
2928} ;
3029
3130export const isRole = ( validationObject : ValidationChain ) : ValidationChain => {
You can’t perform that action at this time.
0 commit comments