forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB2c19dffBurak Boduroğlu2 months ago566 commits

postClass.ts10 lines, 472 bytesHistoryRawDownload
1import { client } from "../client";
2import type { ClassGroup } from "../client";
3
4// `year` is the academic year (`getAcademicYears`) — what binds the şube to a
5// karne and to the rollover. A şube with no year takes no exam.
6export type CreateClassBody = { name: string; grade?: string; year?: string; teacher_id?: string };
7
8export function postClass(body: CreateClassBody): Promise<ClassGroup> {
9 return client<ClassGroup>("/classes", { method: "POST", body });
10}