mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
12 lines
318 B
TypeScript
12 lines
318 B
TypeScript
export const dependencies = {
|
|
"node-fetch": "2.6.1",
|
|
};
|
|
const api = async (args) => {
|
|
const { body, url, method, callback } = args;
|
|
const fetch = require("node-fetch");
|
|
return fetch(url, { method: method, body: body })
|
|
.then((res) => res.json())
|
|
.then((json) => callback(json));
|
|
};
|
|
export default api;
|