forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB078b459Burak Boduroğlu2 months ago671 commits

patchClassById.ts15 lines, 529 bytesHistoryRawDownload
1import { client } from "../client";
2import type { ClassGroup } from "../client";
3
4// Omit a field to keep it; send null on grade/year/teacher_id to clear/unlink it.
5export type UpdateClassBody = {
6 name?: string;
7 grade?: string | null;
8 /** The academic year (`getAcademicYears`) the şube sits in. */
9 year?: string | null;
10 teacher_id?: string | null;
11};
12
13export function patchClassById(id: string, body: UpdateClassBody): Promise<ClassGroup> {
14 return client<ClassGroup>(`/classes/${id}`, { method: "PATCH", body });
15}