Log NetUP request/response body; fix reservation_id to be numeric

- reservation_id converted to integer (NetUP likely requires number not UUID string)
- Log requestBody sent to NetUP and responseBody received from NetUP
- Push event rows now expandable: click to see URL, request JSON, NetUP error response
- Same for checkout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 12:29:45 +03:00
parent d8f560ae12
commit c656d0c6ae
3 changed files with 75 additions and 31 deletions

View File

@@ -290,7 +290,7 @@ export const api = {
getLog: (slug: string) =>
req<{
pushEvents: { ts: string; action: string; roomNumber: string; netupRoom: string; url: string; status: 'ok' | 'error' | 'skipped'; httpStatus?: number; error?: string }[]
pushEvents: { ts: string; action: string; roomNumber: string; netupRoom: string; url: string; requestBody?: unknown; status: 'ok' | 'error' | 'skipped'; httpStatus?: number; responseBody?: string; error?: string }[]
pullRequests: { ts: string; method: string; url: string; headers: Record<string, unknown>; query: Record<string, unknown>; body: unknown }[]
}>('GET', `/api/hotels/${slug}/netup/log`),