slugify lenient (#25923)

This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-12-16 14:01:54 +00:00
1 parent b8827aca52
commit 593ed461c8
4 files changed
+27 -6

No files matched your search

@@ -27,7 +27,7 @@ import {
import { UserWithProfile } from "@/modules/users/users.repository";
import { Injectable, BadRequestException } from "@nestjs/common";
import { slugify } from "@calcom/platform-libraries";
import { slugifyLenient } from "@calcom/platform-libraries";
import { getApps, getUsersCredentialsIncludeServiceAccountKey } from "@calcom/platform-libraries/app-store";
import {
validateCustomEventName,
@@ -146,7 +146,7 @@ export class InputEventTypesService_2024_06_14 {
? this.transformInputBookerActiveBookingsLimit(bookerActiveBookingsLimit)
: {};
const slugifiedSlug = slugify(slug);
const slugifiedSlug = slugifyLenient(slug);
const metadata: EventTypeMetadata = {
bookerLayouts: this.transformInputBookerLayouts(bookerLayouts),
@@ -249,7 +249,7 @@ export class InputEventTypesService_2024_06_14 {
const eventType = {
...rest,
...(slug ? { slug: slugify(slug) } : {}),
...(slug ? { slug: slugifyLenient(slug) } : {}),
length: lengthInMinutes,
locations: locations ? this.transformInputLocations(locations) : undefined,
bookingFields: effectiveBookingFields
@@ -8,7 +8,7 @@ import { UsersRepository } from "@/modules/users/users.repository";
import { BadRequestException, Injectable, NotFoundException } from "@nestjs/common";
import { SchedulingType } from "@calcom/platform-libraries";
import { slugify } from "@calcom/platform-libraries";
import { slugifyLenient } from "@calcom/platform-libraries";
import { EventTypeMetadata } from "@calcom/platform-libraries/event-types";
import {
CreateTeamEventTypeInput_2024_06_14,
@@ -43,7 +43,7 @@ export class InputOrganizationsEventTypesService {
teamId: number,
inputEventType: CreateTeamEventTypeInput_2024_06_14
) {
const slugifiedInputEventType = { ...inputEventType, slug: slugify(inputEventType.slug) };
const slugifiedInputEventType = { ...inputEventType, slug: slugifyLenient(inputEventType.slug) };
await this.validateInputLocations(teamId, inputEventType.locations);
await this.validateHosts(teamId, inputEventType.hosts);
@@ -79,7 +79,7 @@ export class InputOrganizationsEventTypesService {
inputEventType: UpdateTeamEventTypeInput_2024_06_14
) {
const slugifiedInputEventType = inputEventType.slug
? { ...inputEventType, slug: slugify(inputEventType.slug) }
? { ...inputEventType, slug: slugifyLenient(inputEventType.slug) }
: inputEventType;
await this.validateInputLocations(teamId, inputEventType.locations);