forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB4e0a329Burak Boduroğlu2 months ago537 commits

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