forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBd962efeBurak Boduroğlu4 months ago146 commits

patchEventById.ts15 lines, 496 bytesHistoryRawDownload
1import { client } from "./client";
2import type { Event, EventAudience } from "./types";
3
4/** Omitted time fields keep their value; explicit null clears them. */
5export type PatchEventBody = {
6 title?: string | null;
7 description?: string | null;
8 audience?: EventAudience | null;
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}