MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / getEvents

Method getEvents

src/api/CalendarsController.ts:88–107  ·  view source on GitHub ↗
(req: HTTPRequestLike, res: HTTPResponseLike)

Source from the content-addressed store, hash-verified

86
87 @Get("/api/calendars/events")
88 async getEvents(req: HTTPRequestLike, res: HTTPResponseLike): Promise<void> {
89 try {
90 const params = parseRequestUrl(req).searchParams;
91
92 const start = params.get("start");
93 const end = params.get("end");
94 const startDate = start ? new Date(start) : null;
95 const endDate = end ? new Date(end) : null;
96
97 const result = collectCalendarEvents(
98 this.calendarProviderRegistry,
99 this.icsSubscriptionService,
100 { start: startDate, end: endDate }
101 );
102
103 this.sendResponse(res, 200, this.successResponse(result));
104 } catch (error: unknown) {
105 this.sendResponse(res, 500, this.errorResponse(this.getErrorMessage(error)));
106 }
107 }
108
109 private async getProvidersOverview(): Promise<unknown[]> {
110 const providers: unknown[] = [];

Callers

nothing calls this directly

Calls 7

parseRequestUrlFunction · 0.90
collectCalendarEventsFunction · 0.90
sendResponseMethod · 0.80
successResponseMethod · 0.80
errorResponseMethod · 0.80
getMethod · 0.65
getErrorMessageMethod · 0.45

Tested by

no test coverage detected