forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postCourse.ts16 lines, 484 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Course, CourseKind } from "../client";
3
4/**
5 * A catalog row teaches nobody by itself — a şube attaches it
6 * (`postClassInstance`), which is what mints the instance students sit in.
7 */
8export type PostCourseBody = {
9 title: string;
10 description?: string | null;
11 kind?: CourseKind | null;
12};
13
14export function postCourse(body: PostCourseBody): Promise<Course> {
15 return client<Course>("/courses", { method: "POST", body });
16}