feat: check for updates

This commit is contained in:
Nicolas Giard
2019-01-13 15:37:45 -05:00
parent 959f2ebde1
commit 63c044a09b
13 changed files with 95 additions and 15 deletions

View File

@@ -75,7 +75,7 @@ module.exports = {
},
async update(obj, args) {
if(_.some(args.pageRules, pr => {
return pr.match !== 'REGEX' || safeRegex(pr.path)
return pr.match === 'REGEX' && !safeRegex(pr.path)
})) {
throw new gql.GraphQLError('Some Page Rules contains unsafe or exponential time regex.')
}