remove redundant conditional expressions (#2756)
* remove redundant conditional expressions * remove redundant conditional expression Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>pull/2768/head^2
parent
2eae40eff2
commit
e4c5df7a2e
|
@ -8,7 +8,7 @@ export const hasTemplateIntegration = (props: WebhookIntegrationProps) => {
|
||||||
const ind = supportedWebhookIntegrationList.findIndex((integration) => {
|
const ind = supportedWebhookIntegrationList.findIndex((integration) => {
|
||||||
return props.url.includes(integration);
|
return props.url.includes(integration);
|
||||||
});
|
});
|
||||||
return ind > -1 ? true : false;
|
return ind > -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
const customTemplate = (props: WebhookIntegrationProps) => {
|
const customTemplate = (props: WebhookIntegrationProps) => {
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
slug: eventType.slug,
|
slug: eventType.slug,
|
||||||
length: eventType.durations[0],
|
length: eventType.durations[0],
|
||||||
description: eventType.description.replace(/<[^>]*>?/gm, ""),
|
description: eventType.description.replace(/<[^>]*>?/gm, ""),
|
||||||
hidden: eventType.state === "active" ? true : false,
|
hidden: eventType.state === "active",
|
||||||
users: {
|
users: {
|
||||||
connect: {
|
connect: {
|
||||||
id: authenticatedUser.id,
|
id: authenticatedUser.id,
|
||||||
|
|
Loading…
Reference in New Issue