Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: ignore query string

Nevo David034032a3167a
diff --git a/libraries/helpers/src/utils/valid.url.path.ts b/libraries/helpers/src/utils/valid.url.path.ts
index 469f82293..fbcc00692 100644
--- a/libraries/helpers/src/utils/valid.url.path.ts
+++ b/libraries/helpers/src/utils/valid.url.path.ts
@@ -8,11 +8,11 @@ import {
export class ValidUrlExtension implements ValidatorConstraintInterface {
validate(text: string, args: ValidationArguments) {
return (
- text?.endsWith('.png') ||
- text?.endsWith('.jpg') ||
- text?.endsWith('.jpeg') ||
- text?.endsWith('.gif') ||
- text?.endsWith('.mp4')
+ !!text?.split?.('?')?.[0].endsWith('.png') ||
+ !!text?.split?.('?')?.[0].endsWith('.jpg') ||
+ !!text?.split?.('?')?.[0].endsWith('.jpeg') ||
+ !!text?.split?.('?')?.[0].endsWith('.gif') ||
+ !!text?.split?.('?')?.[0].endsWith('.mp4')
);
}