2
0
mirror of https://github.com/frappe/books.git synced 2025-01-09 09:50:27 +00:00
books/main/api.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
267 B
TypeScript
Raw Normal View History

2024-11-26 07:09:58 +00:00
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;
}[];
}