hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Board, BoardInviteBody } from "./types"; |
| 3 | |
| 4 | // Adds every member of a class, course/club or event to the roster in one |
| 5 | // pass. Creator only. Additive and idempotent — it never removes anyone, and |
| 6 | // members already on the board are skipped. Parents and ids that no longer |
| 7 | // resolve are dropped silently, but going over max_participants refuses the |
| 8 | // whole invite with a 409 and adds nobody. A named id that does not exist is a |
| 9 | // 400, not a 404 — a 404 here would mean the board itself. |
| 10 | export function postBoardInvite(id: string, body: BoardInviteBody): Promise<Board> { |
| 11 | return client<Board>(`/boards/${encodeURIComponent(id)}/invite`, { method: "POST", body }); |
| 12 | } |