From 04ca5b377708de6c24af15a73e91f51a0383de25 Mon Sep 17 00:00:00 2001 From: NK Date: Fri, 3 Mar 2023 22:12:05 +0000 Subject: [PATCH] accepting more methods --- pages/api/skyblock.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/api/skyblock.js b/pages/api/skyblock.js index b6d9474..7dc640e 100644 --- a/pages/api/skyblock.js +++ b/pages/api/skyblock.js @@ -7,12 +7,13 @@ async function decodeData(buffer) { } let dat; export default async function handler(req, res) { - if (req.method == "GET") { + if (req.method == "POST" || req.method == "GET" || req.method == "PUT") { try { dat = JSON.parse(req.body).ByteData; } catch (e) { dat = req.body.ByteData; } + console.log(dat); if (dat == undefined) res.status(400).json({error: "ByteData is undefined"}); const data = await getItemNetworth((await decodeData(dat)).i[0], {