forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB0069847Burak Boduroğlu2 months ago552 commits

patchEventById.ts15 lines, 491 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Event, EventAudience } from "../client";
3
4/** Omitted fields keep their value. Only the time fields clear on explicit null. */
5export type PatchEventBody = {
6 title?: string;
7 description?: string;
8 audience?: EventAudience;
9 starts_at?: number | null;
10 ends_at?: number | null;
11};
12
13export function patchEventById(id: string, body: PatchEventBody): Promise<Event> {
14 return client<Event>(`/events/${id}`, { method: "PATCH", body });
15}