ai / frontend /src /lib /apis /tasks /index.ts
fdrah
initial-commit
9e93b10
Raw
History Blame Contribute Delete
428 Bytes
import { REXPRO_API_BASE_URL } from '$lib/constants';
export const checkActiveChats = async (token: string, chatIds: string[]) => {
const res = await fetch(`${REXPRO_API_BASE_URL}/tasks/active/chats`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
},
body: JSON.stringify({ chat_ids: chatIds })
});
if (!res.ok) throw await res.json();
return res.json();
};