hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB7122d71Burak Boduroğlu4 months ago419 commits
| 1 | import { client } from "../client"; |
| 2 | import type { Event, EventAudience } from "../client"; |
| 3 | |
| 4 | /** Omitted fields keep their value. Only the time fields clear on explicit null. */ |
| 5 | export type PatchEventBody = { |
| 6 | title?: string; |
| 7 | description?: string; |
| 8 | audience?: EventAudience; |
| 9 | starts_at?: number | null; |
| 10 | ends_at?: number | null; |
| 11 | }; |
| 12 | |
| 13 | export function patchEventById(id: string, body: PatchEventBody): Promise<Event> { |
| 14 | return client<Event>(`/events/${id}`, { method: "PATCH", body }); |
| 15 | } |