mirror of
https://github.com/danbulant/Mangades
synced 2026-06-17 13:21:03 +00:00
23 lines
No EOL
543 B
JavaScript
23 lines
No EOL
543 B
JavaScript
export const base = "https://api.mangadex.network/";
|
|
|
|
/**
|
|
* reports method
|
|
* @param {object} body
|
|
* @param {string} body.url
|
|
* @param {boolean} body.success
|
|
* @param {number} body.bytes
|
|
* @param {number} body.duration
|
|
* @param {boolean} body.cached
|
|
*/
|
|
async function report(body) {
|
|
await fetch(base + "report", {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json"
|
|
},
|
|
credentials: "omit",
|
|
body: body ? JSON.stringify(body) : undefined
|
|
});
|
|
}
|
|
|
|
export default report; |