* perf: don't fetch all the hosts #18319 followup * undo for user events * undo for regular user events * fix: limitHostsToThree -> hostsLimit * accepting hostLimit prop in <Booker /> * Update booking.tsx * hostLimit -> hostsLimit
This commit is contained in:
1 parent
8d2dc0bbe5
commit
56cd9cef8b
10 files changed
+138
-66
No files matched your search
+6
-2
@@ -149,10 +149,14 @@ export class OrganizationsEventTypesController {
|
||||
@Param("teamId", ParseIntPipe) teamId: number,
|
||||
@Query() queryParams: GetTeamEventTypesQuery_2024_06_14
|
||||
): Promise<GetTeamEventTypesOutput> {
|
||||
const { eventSlug } = queryParams;
|
||||
const { eventSlug, hostsLimit } = queryParams;
|
||||
|
||||
if (eventSlug) {
|
||||
const eventType = await this.organizationsEventTypesService.getTeamEventTypeBySlug(teamId, eventSlug);
|
||||
const eventType = await this.organizationsEventTypesService.getTeamEventTypeBySlug(
|
||||
teamId,
|
||||
eventSlug,
|
||||
hostsLimit
|
||||
);
|
||||
|
||||
return {
|
||||
status: SUCCESS_STATUS,
|
||||
|
||||
+6
-2
@@ -64,8 +64,12 @@ export class OrganizationsEventTypesService {
|
||||
return this.teamsEventTypesService.getTeamEventType(teamId, eventTypeId);
|
||||
}
|
||||
|
||||
async getTeamEventTypeBySlug(teamId: number, eventTypeSlug: string): Promise<DatabaseTeamEventType | null> {
|
||||
return this.teamsEventTypesService.getTeamEventTypeBySlug(teamId, eventTypeSlug);
|
||||
async getTeamEventTypeBySlug(
|
||||
teamId: number,
|
||||
eventTypeSlug: string,
|
||||
hostsLimit?: number
|
||||
): Promise<DatabaseTeamEventType | null> {
|
||||
return this.teamsEventTypesService.getTeamEventTypeBySlug(teamId, eventTypeSlug, hostsLimit);
|
||||
}
|
||||
|
||||
async getTeamEventTypes(teamId: number): Promise<DatabaseTeamEventType[]> {
|
||||
|
||||
Reference in new issue
Block a user