We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49c4c19 commit 3a7d637Copy full SHA for 3a7d637
1 file changed
src/resolvers/projectPatterns.ts
@@ -1,7 +1,7 @@
1
import { ResolverContextWithUser } from '../types/graphql';
2
import { ApolloError } from 'apollo-server-express';
3
import { ProjectEventGroupingPatternsDBScheme } from '@hawk.so/types';
4
-import { isSafeRegex } from 'safe-regex';
+import safe from 'safe-regex';
5
6
/**
7
* Type that represents payload for create project pattern mutation
@@ -73,7 +73,7 @@ function validateNewEventGroupingPattern(
73
74
* Check if pattern is safe RegExp
75
*/
76
- if (!isSafeRegex(newEventGroupingPattern)) {
+ if (!safe(newEventGroupingPattern)) {
77
throw new ApolloError('Invalid regular expression pattern');
78
}
79
0 commit comments