update: webhooks

This commit is contained in:
anik-ghosh-au7 2022-07-17 14:48:20 +05:30
parent 94066d4408
commit df17ea8f40
2 changed files with 1 additions and 10 deletions

View File

@ -29,11 +29,7 @@ import {
WebhookInputHeaderFields, WebhookInputHeaderFields,
UpdateWebhookModalViews, UpdateWebhookModalViews,
} from '../constants'; } from '../constants';
import { import { capitalizeFirstLetter, validateURI } from '../utils';
capitalizeFirstLetter,
validateEventName,
validateURI,
} from '../utils';
import { AddWebhook, EditWebhook } from '../graphql/mutation'; import { AddWebhook, EditWebhook } from '../graphql/mutation';
import { rest } from 'lodash'; import { rest } from 'lodash';

View File

@ -86,8 +86,3 @@ export const validateURI = (uri: string) => {
? true ? true
: false; : false;
}; };
export const validateEventName = (name: string) => {
if (!name || name === '') return true;
return name.toLowerCase().match(/^.{4,}[.].{5,}$/) ? true : false;
};