forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postInstanceEnrollment.ts13 lines, 430 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Enrollment } from "../client";
3
4/**
5 * Idempotent upsert; students only. The row is hand-placed (`source` null), so
6 * no şube sweep takes it back.
7 */
8export function postInstanceEnrollment(instanceId: string, userId: string): Promise<Enrollment> {
9 return client<Enrollment>(`/instances/${instanceId}/enrollments`, {
10 method: "POST",
11 body: { user_id: userId },
12 });
13}