fix: org team page not found with uppercase letters (#11737)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/11962/head^2
parent
4b818de0c8
commit
feda420f0c
|
@ -1,6 +1,7 @@
|
||||||
import type { Prisma } from "@prisma/client";
|
import type { Prisma } from "@prisma/client";
|
||||||
|
|
||||||
import { ALLOWED_HOSTNAMES, RESERVED_SUBDOMAINS, WEBAPP_URL } from "@calcom/lib/constants";
|
import { ALLOWED_HOSTNAMES, RESERVED_SUBDOMAINS, WEBAPP_URL } from "@calcom/lib/constants";
|
||||||
|
import slugify from "@calcom/lib/slugify";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return the org slug
|
* return the org slug
|
||||||
|
@ -52,13 +53,14 @@ export function getOrgFullDomain(slug: string, options: { protocol: boolean } =
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSlugOrRequestedSlug(slug: string) {
|
export function getSlugOrRequestedSlug(slug: string) {
|
||||||
|
const slugifiedValue = slugify(slug);
|
||||||
return {
|
return {
|
||||||
OR: [
|
OR: [
|
||||||
{ slug },
|
{ slug: slugifiedValue },
|
||||||
{
|
{
|
||||||
metadata: {
|
metadata: {
|
||||||
path: ["requestedSlug"],
|
path: ["requestedSlug"],
|
||||||
equals: slug,
|
equals: slugifiedValue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue