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
Hashen 2022-05-16 22:56:32 +05:30 committed by GitHub
parent 2eae40eff2
commit e4c5df7a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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) => {

View File

@ -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,