forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

patchOfferingById.ts15 lines, 583 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Offering } from "../client";
3
4/** Omit to keep; an explicit null clears the field back to inherit. */
5export type UpdateOfferingBody = Partial<{
6 title: string | null;
7 description: string | null;
8 default_ders_saati: number | null;
9 default_counts_toward_karne: boolean | null;
10}>;
11
12// Manager+. Sections without their own override follow the change at once.
13export function patchOfferingById(id: string, body: UpdateOfferingBody): Promise<Offering> {
14 return client<Offering>(`/offerings/${id}`, { method: "PATCH", body });
15}