forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

postSchool.ts16 lines, 483 bytesHistoryRawDownload
1import { client } from "../client";
2import type { School } from "../client";
3
4export type CreateSchoolBody = {
5 /** Immutable once taken: names the school's database, blobs and cookie prefix. */
6 slug: string;
7 name: string;
8 admin_username: string;
9 admin_password: string;
10 /** Omitted sells the whole catalog. */
11 modules?: string[];
12};
13
14export function postSchool(body: CreateSchoolBody): Promise<School> {
15 return client<School>("/schools", { method: "POST", body });
16}