From 61ab4732c598139eafda22e7d66d6b6c0673a5ed Mon Sep 17 00:00:00 2001 From: Matvey Date: Tue, 25 Jul 2023 09:40:59 +1000 Subject: [PATCH] Add files via upload --- misc/demonlist.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/demonlist.js b/misc/demonlist.js index 334cef8..f648162 100644 --- a/misc/demonlist.js +++ b/misc/demonlist.js @@ -1,16 +1,16 @@ module.exports = { demonlist: - async function(name) { + async function (name) { let r = await fetch(`https://pointercrate.com/api/v2/demons/?name=${name}`); let lvlObj = await r.json(); - if(lvlObj == undefined) return null; - + if (!lvlObj.length) return null; + const res = { "position": lvlObj[0].position, "publisher": lvlObj[0].publisher.name, "verifier": lvlObj[0].verifier.name, } - + return res; } } \ No newline at end of file