From 884f929141781d574860cc173f9945f826b60af7 Mon Sep 17 00:00:00 2001 From: TheCaJlaT <66368050+TheCaJlaT@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:11:32 +0300 Subject: [PATCH] Add files via upload v 1.0.1 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0257eec..79821ce 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,7 @@ class Crypto { 'Accept': 'application/json, text/plain, */*', 'Content-Type': 'application/json' } - }).then(res => res.json()) + }).then(res => res.status === 200 ? res.json() : res.text()) } async stats() { return await this.call()