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