forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postOffering.ts17 lines, 582 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Offering } from "../client";
3
4export type CreateOfferingBody = {
5 course: string;
6 grade_level: number;
7 title?: string | null;
8 description?: string | null;
9 default_ders_saati?: number | null;
10 default_counts_toward_karne?: boolean | null;
11};
12
13// Manager+. Only a `course`-kind ders has a grade axis; a second template for
14// the same (course, grade) is a 409 `offering_exists`.
15export function postOffering(body: CreateOfferingBody): Promise<Offering> {
16 return client<Offering>("/offerings", { method: "POST", body });
17}