hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB4e0a329Burak Boduroğlu2 months ago537 commits
| 1 | import { client } from "../client"; |
| 2 | import type { SchoolModules } from "../client"; |
| 3 | |
| 4 | export type PatchSchoolModulesBody = { |
| 5 | enable?: string[]; |
| 6 | disable?: string[]; |
| 7 | enable_packages?: string[]; |
| 8 | disable_packages?: string[]; |
| 9 | }; |
| 10 | |
| 11 | // One atomic re-sell: a 409 names every broken dependency and nothing is written. |
| 12 | export function patchSchoolModules(slug: string, body: PatchSchoolModulesBody): Promise<SchoolModules> { |
| 13 | return client<SchoolModules>(`/schools/${encodeURIComponent(slug)}/modules`, { method: "PATCH", body }); |
| 14 | } |