test filter function

pull/403/head
Rebecca-Chou 10 months ago
parent 6dc69fbe14
commit 615a8ddbf9
  1. 10
      lib/members.ts

@ -33,13 +33,13 @@ export async function getMembers(year: string, term: Term): Promise<Member[]> {
return {
name: item.cn as string,
id: item.uid as string,
program:
item.position === undefined ? "none" : (item.position as string),
program: item.position === undefined ? "" : (item.position as string),
};
})
.sort((item1: Member, item2: Member) =>
item1.name.localeCompare(item2.name)
);
.filter((item: Member) => item.program !== "");
// .sort((item1: Member, item2: Member) =>
// item1.name.localeCompare(item2.name)
// );
} finally {
await client.unbind();
}

Loading…
Cancel
Save