()
| 33 | } |
| 34 | |
| 35 | export async function createConversation() { |
| 36 | const res = await fetch(state.API_BASE + "/api/conversations", { |
| 37 | method: "POST", |
| 38 | headers: { "Content-Type": "application/json" }, |
| 39 | }); |
| 40 | if (!res.ok) { |
| 41 | throw new Error("Create Conversation Failed"); |
| 42 | } |
| 43 | return await res.json(); |
| 44 | } |
| 45 | |
| 46 | export async function getConversationMessages(channelId, limit = 200) { |
| 47 | const params = new URLSearchParams({ limit: String(limit) }); |
no outgoing calls
no test coverage detected