()
| 50 | |
| 51 | // Chats |
| 52 | export async function getChats() { |
| 53 | const res = await fetch(`${API_BASE}/chats`, { headers: getHeaders() }); |
| 54 | if (!res.ok) throw new Error('Failed to fetch chats'); |
| 55 | return res.json(); |
| 56 | } |
| 57 | |
| 58 | export async function getChat(id) { |
| 59 | const res = await fetch(`${API_BASE}/chats/${id}`, { headers: getHeaders() }); |
no test coverage detected