Skip to content

Commit

Permalink
fix: v2 not running (#13636)
Browse files Browse the repository at this point in the history
* fix: import from platform-libraries instead of lib

* fix: typescript error

* fix: provide EventTypesRepository to SlotsService
  • Loading branch information
supalarry committed Feb 12, 2024
1 parent d5d00d8 commit 7f2e1a0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/api/v2/src/ee/event-types/event-types.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import { Module } from "@nestjs/common";
imports: [PrismaModule, MembershipsModule],
providers: [EventTypesRepository, EventTypesService],
controllers: [EventTypesController],
exports: [EventTypesService],
exports: [EventTypesService, EventTypesRepository],
})
export class EventTypesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ export class SchedulesController {
async getDefaultSchedule(
@GetUser() user: User,
@ForAtom() forAtom: boolean
): Promise<ApiResponse<{ schedule: ScheduleResponse | ScheduleWithAvailabilitiesForWeb }>> {
): Promise<ApiResponse<{ schedule: ScheduleResponse | ScheduleWithAvailabilitiesForWeb | null }>> {
const schedule = await this.schedulesService.getUserScheduleDefault(user.id);
const scheduleFormatted = await this.schedulesResponseService.formatSchedule(forAtom, user, schedule);
const scheduleFormatted = schedule
? await this.schedulesResponseService.formatSchedule(forAtom, user, schedule)
: null;

return {
status: SUCCESS_STATUS,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v2/src/modules/slots/slots.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
import { ReserveSlotInput } from "@/modules/slots/inputs/reserve-slot.input";
import { DateTime } from "luxon";

import { MINUTES_TO_BOOK } from "@calcom/lib/constants";
import { MINUTES_TO_BOOK } from "@calcom/platform-libraries";

export class SlotsRepository {
constructor(private readonly dbRead: PrismaReadService, private readonly dbWrite: PrismaWriteService) {}
Expand Down
2 changes: 2 additions & 0 deletions packages/platform/libraries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ export type {
} from "@calcom/features/bookings/types";
export { HttpError } from "@calcom/lib/http-error";
export type { AppsStatus } from "@calcom/types/Calendar";

export { MINUTES_TO_BOOK } from "@calcom/lib/constants";

0 comments on commit 7f2e1a0

Please sign in to comment.