(logUrl: string, log: any)
| 1 | export const updateLog = async (logUrl: string, log: any) => { |
| 2 | try { |
| 3 | const response = await fetch(logUrl, { |
| 4 | method: "PUT", |
| 5 | headers: { |
| 6 | "Content-Type": "application/json", |
| 7 | }, |
| 8 | body: JSON.stringify(log), |
| 9 | }); |
| 10 | if (!response.ok) { |
| 11 | const error = await response.text(); |
| 12 | console.error("Failed to update log", error); |
| 13 | } |
| 14 | } catch (e: unknown) { |
| 15 | console.error(e); |
| 16 | } |
| 17 | }; |
no test coverage detected