refactor: GetAvailableSlotsService (#22321)

* refactor: GetAvailableSlotsService

* chore: add todo comments where DI is needed

* chore: bump platform libs
This commit is contained in:
Morgan authored and GitHub committed 2025-07-08 16:54:45 -04:00
1 parent 0c182e2813
commit c3dab3e4f8
18 files changed
+1337 -1277

No files matched your search

@@ -1,6 +1,6 @@
import type { IncomingMessage } from "http";
import { getAvailableSlots } from "../slots/util";
import { AvailableSlotsService } from "../slots/util";
import type { TGetTeamScheduleInputSchema } from "./getTeamSchedule.schema";
export type GetTeamScheduleOptions = {
@@ -13,5 +13,6 @@ interface ContextForGetSchedule extends Record<string, unknown> {
}
export const getTeamScheduleHandler = async ({ ctx, input }: GetTeamScheduleOptions) => {
return await getAvailableSlots({ ctx, input });
const availableSlotsService = new AvailableSlotsService();
return await availableSlotsService.getAvailableSlots({ ctx, input });
};
@@ -1,6 +1,7 @@
import type { GetScheduleOptions } from "./types";
import { getAvailableSlots } from "./util";
import { AvailableSlotsService } from "./util";
export const getScheduleHandler = async ({ ctx, input }: GetScheduleOptions) => {
return await getAvailableSlots({ ctx, input });
const availableSlotsService = new AvailableSlotsService();
return await availableSlotsService.getAvailableSlots({ ctx, input });
};
File diff suppressed because it is too large. Load diff