forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postBoardInvite.ts12 lines, 723 bytesHistoryRawDownload
1import { client } from "../client";
2import 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.
10export function postBoardInvite(id: string, body: BoardInviteBody): Promise<Board> {
11 return client<Board>(`/boards/${encodeURIComponent(id)}/invite`, { method: "POST", body });
12}