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_BLOCKED, 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=1695548764; bh=dtpq0V+8ujla2mAqfj38LRC1CwYF3MBoE5c7lL/PIjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nEmaj8/Qm9DKLURZ4hdY3bpEmRlZdJX1PmEXyUGM+vMN2LEqD7v8GJign/A0P9KE/ Mym0av/Q3HYsD3FHz16erP5I3UMRk2w62AcsArMfsv8FL7yRSCbvxAS8vCzN7mAApd 9GG6Wvx1xUPTIb1ydenm5fX9FfZd8uUOejTtloc+Z+T2r7oU2ShdJuz1ciGXgU4f7m dEscC1hUM+5lRvoe+s8ZzaEOCq3eym4kfVUTqmmx7Z9SKl3QQOgY5d5/GTu3uELRAZ +uMMuo159i9LWEz9TB9LvFsKw/ollIbDMlWh2JIR1pY4KdW7uOpB14pTDzv4zihJsv EpizLCaYqZj3w== Received: from localhost.localdomain (unknown [101.128.125.146]) by gnuweeb.org (Postfix) with ESMTPSA id 1991C24B718; Sun, 24 Sep 2023 16:46:02 +0700 (WIB) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Arthur Lapz , Memet Zx , GNU/Weeb Mailing List Subject: [PATCH v3 07/11] feat(page): add `getOrgMembers()` function Date: Sun, 24 Sep 2023 16:45:28 +0700 Message-Id: <20230924094532.1662-8-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230924094532.1662-1-kiizuha@gnuweeb.org> References: <20230924094532.1662-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