From feda420f0c67bc88b2cf1ed2dc1114ca2121ed00 Mon Sep 17 00:00:00 2001 From: Nafees Nazik <84864519+G3root@users.noreply.github.com> Date: Thu, 19 Oct 2023 19:14:43 +0530 Subject: [PATCH] fix: org team page not found with uppercase letters (#11737) Co-authored-by: Peer Richelsen --- packages/features/ee/organizations/lib/orgDomains.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/features/ee/organizations/lib/orgDomains.ts b/packages/features/ee/organizations/lib/orgDomains.ts index 0d8051ffb7..68f6425fad 100644 --- a/packages/features/ee/organizations/lib/orgDomains.ts +++ b/packages/features/ee/organizations/lib/orgDomains.ts @@ -1,6 +1,7 @@ import type { Prisma } from "@prisma/client"; import { ALLOWED_HOSTNAMES, RESERVED_SUBDOMAINS, WEBAPP_URL } from "@calcom/lib/constants"; +import slugify from "@calcom/lib/slugify"; /** * return the org slug @@ -52,13 +53,14 @@ export function getOrgFullDomain(slug: string, options: { protocol: boolean } = } export function getSlugOrRequestedSlug(slug: string) { + const slugifiedValue = slugify(slug); return { OR: [ - { slug }, + { slug: slugifiedValue }, { metadata: { path: ["requestedSlug"], - equals: slug, + equals: slugifiedValue, }, }, ],