From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1695460553; bh=dtpq0V+8ujla2mAqfj38LRC1CwYF3MBoE5c7lL/PIjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Y5DLpP3CE1u44licSakDBxXmFyPI399FIEE3MDeMZR9lGKyRxXlG3T5+v/HFEbS/Y iwp4YI3POpjeSzsDgUlVMsWkoDIKaJfmn+UCF+SVjAl/iUW1SHpQF58uFPgfH/mnQb QSUs4aDpfIaEf0jppCn572m4ZyAOXO9kqr+ELMHfQquItRYlE7W14zZD8jXMzpJtNj icqPJJ2Mf7pi3eY7DyakxOwK7Qp0BH+NTblC9vYU69gHQYPg0Hi2CSopoccBwdd2J3 lrGxAhpaC+2dnPqxRnD3Zm/b6sDHhmtL1gDBw5Qzx2kISTCWlyD6CMT+xKrqSdgQV8 RH8KVkRaoJjzA== Received: from localhost.localdomain (unknown [175.158.50.129]) by gnuweeb.org (Postfix) with ESMTPSA id A332F24B6C9; Sat, 23 Sep 2023 16:15:51 +0700 (WIB) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Arthur Lapz , Memet Zx , GNU/Weeb Mailing List Subject: [PATCH v2 07/11] feat(page): add `getOrgMembers()` function Date: Sat, 23 Sep 2023 16:15:10 +0700 Message-Id: <20230923091514.1835-8-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230923091514.1835-1-kiizuha@gnuweeb.org> References: <20230923091514.1835-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This commit adds the `getOrgMembers()` function, which is responsible for retrieving the list of organization members. This function will be called for the next commit. Signed-off-by: Muhammad Rizki --- index.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/index.html b/index.html index 40f8a9e..26e4043 100644 --- a/index.html +++ b/index.html @@ -294,6 +294,21 @@ copyText.classList.remove("bg-neutral-800"); }, 3000); } + + async function getOrgMembers() { + const response = await fetch("https://api.github.com/orgs/gnuweeb/members"); + const data = await response.json(); + + data.sort((left, right) => { + const usernameA = left.login.toLowerCase(); + const usernameB = right.login.toLowerCase(); + if (usernameA < usernameB) return -1; + if (usernameA > usernameB) return 1; + return 0; + }); + + return data; + } -- Muhammad Rizki