forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

patchSessionById.ts14 lines, 467 bytesHistoryRawDownload
1import { client } from "../client";
2import type { CourseSession } from "../client";
3
4/** Omitted fields keep their value. Only `ends_at` clears on explicit null. */
5export type PatchSessionBody = {
6 topic?: string;
7 teacher_id?: string;
8 starts_at?: number;
9 ends_at?: number | null;
10};
11
12export function patchSessionById(id: string, body: PatchSessionBody): Promise<CourseSession> {
13 return client<CourseSession>(`/sessions/${id}`, { method: "PATCH", body });
14}