2
0
mirror of https://github.com/frappe/books.git synced 2025-01-25 08:08:37 +00:00
books/main/api.ts

11 lines
267 B
TypeScript
Raw Normal View History

2024-11-26 12:39:58 +05:30
import fetch, { RequestInit } from 'node-fetch';
export async function sendAPIRequest(
endpoint: string,
options: RequestInit | undefined
) {
return (await fetch(endpoint, options)).json() as unknown as {
[key: string]: string | number | boolean;
}[];
}