Function get_my_events

Source
pub async fn get_my_events(
    __arg0: State<AppState>,
    __arg1: Extension<AuthUser>,
    __arg2: Query<GetEventsQuery>,
) -> impl IntoResponse
Expand description

GET handler for /api/me/events

Retrieves calendar events for the authenticated user within an optional date range. Events include assignment availability dates and due dates, grouped by their timestamps.

§Query Parameters

  • from (optional): Start date filter in ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss)
  • to (optional): End date filter in ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss)

§Response

  • 200 OK: Returns a map where:
    • Keys are ISO 8601 timestamps without fractional seconds
    • Values are arrays of events occurring at that timestamp
    • Each event has a type (“warning” for availability, “error” for due dates)
    • Event content describes the assignment name and event type