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>
This commit is contained in:
Hashen
2022-05-16 22:56:32 +05:30
committed by GitHub
parent 2eae40eff2
commit e4c5df7a2e
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) => {
return props.url.includes(integration);
});
return ind > -1 ? true : false;
return ind > -1;
};
const customTemplate = (props: WebhookIntegrationProps) => {

View File

@@ -57,7 +57,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
slug: eventType.slug,
length: eventType.durations[0],
description: eventType.description.replace(/<[^>]*>?/gm, ""),
hidden: eventType.state === "active" ? true : false,
hidden: eventType.state === "active",
users: {
connect: {
id: authenticatedUser.id,