(params?: { requestId?: string; since?: number })
| 19 | } |
| 20 | |
| 21 | export function fetchLogs(params?: { requestId?: string; since?: number }): Promise<LogEntry[]> { |
| 22 | const q = new URLSearchParams(); |
| 23 | if (params?.requestId) q.set('requestId', params.requestId); |
| 24 | if (params?.since != null) q.set('since', String(params.since)); |
| 25 | const qs = q.toString() ? '?' + q.toString() : ''; |
| 26 | return apiFetch<LogEntry[]>(`/api/logs${qs}`); |
| 27 | } |
| 28 | |
| 29 | export function fetchRequests(limit = 50): Promise<RequestSummary[]> { |
| 30 | return apiFetch<RequestSummary[]>(`/api/requests?limit=${limit}`); |
no test coverage detected