forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postInstanceSession.ts14 lines, 506 bytesHistoryRawDownload
1import { client } from "../client";
2import type { CourseSession } from "../client";
3
4export type PostInstanceSessionBody = {
5 topic?: string | null;
6 /** Defaults to the caller; must hold `teacher` or higher. */
7 teacher_id?: string | null;
8 starts_at: number;
9 ends_at?: number | null;
10};
11
12export function postInstanceSession(instanceId: string, body: PostInstanceSessionBody): Promise<CourseSession> {
13 return client<CourseSession>(`/instances/${instanceId}/sessions`, { method: "POST", body });
14}