Allows for editing Hunt details

This commit is contained in:
2026-05-18 16:31:00 -05:00
parent fd4d86db5b
commit 6e4edd96ce
3 changed files with 106 additions and 8 deletions

View File

@@ -35,6 +35,9 @@ export const apiGetAllHunts = (status?: 'UNSTARTED' | 'ONGOING' | 'CLOSED') =>
export const apiCreateHunt = (title: string, startDateTime: string, endDateTime: string) =>
client.post<HuntResponse>('/hunt', { title, startDateTime, endDateTime })
export const apiUpdateHunt = (huntId: string, title: string, startDateTime: string, endDateTime: string, isTerminated: boolean) =>
client.patch<HuntResponse>(`/hunt/${huntId}`, { title, startDateTime, endDateTime, isTerminated })
// ── Hunter ────────────────────────────────────────────────────────────────────
export const apiGetOngoingHunts = () =>