Spaces:
Runtime error
Runtime error
File size: 428 Bytes
9e93b10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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();
};
|