fetch array at index 0 from ldap
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
3dbc1efe39
commit
0c0515a3c6
|
@ -43,7 +43,12 @@ 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 ? "" : typeof item.position,
|
||||
program:
|
||||
item.position === undefined
|
||||
? ""
|
||||
: typeof item.position === "string"
|
||||
? item.position
|
||||
: (item.position[0] as string),
|
||||
};
|
||||
})
|
||||
.filter((item: Member) => item.program !== "");
|
||||
|
|
|
@ -67,7 +67,11 @@ export async function getExecNames() {
|
|||
return {
|
||||
name: item.cn as string,
|
||||
position:
|
||||
item.position === undefined ? "" : (item.position[0] as string),
|
||||
item.position === undefined
|
||||
? ""
|
||||
: typeof item.position === "string"
|
||||
? item.position
|
||||
: (item.position[0] as string),
|
||||
};
|
||||
})
|
||||
.filter((item: ExecMembers) => item.position !== "");
|
||||
|
|
Loading…
Reference in New Issue