From d929e6ffb368b9905eae0b3d8de1ad89e988a2d5 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 1 Apr 2022 20:21:00 -0600 Subject: [PATCH] utils.hastebin: set content type --- src/lib/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/utils.js b/src/lib/utils.js index 509af83..c802458 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -153,9 +153,10 @@ async function getImage(msg, str) { async function hastebin(body) { const res = await fetch(`https://nekobin.com/api/documents`, { method: "POST", - body: JSON.stringify({content:body}), + headers: {"Content-Type": "application/json"}, + body: JSON.stringify({content: body}), }).then((r) => r.json()); - return "https://nekobin.com"+res.result.key; + return "https://nekobin.com" + res.result.key; } hf.selectionMessages = hf.selectionMessages || new Eris.Collection();