|
|
|
@ -96,7 +96,7 @@ export async function getExec(name: string, pos: string, convert = true) { |
|
|
|
|
const raw = await readFile(path.join(EXECS_PATH, `${name}${FILETYPE}`)); |
|
|
|
|
({ content, data: metadata } = matter(raw)); |
|
|
|
|
|
|
|
|
|
const image = await getMemberImagePath(metadata.name, true); |
|
|
|
|
const image = await getMemberImagePath(metadata.name); |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
content: convert ? await serialize(content) : content, |
|
|
|
@ -114,7 +114,7 @@ export async function getExec(name: string, pos: string, convert = true) { |
|
|
|
|
role: `${posName}`, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const image = await getMemberImagePath(metadata.name, true); |
|
|
|
|
const image = await getMemberImagePath(metadata.name); |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
content: convert ? await serialize(content) : content, |
|
|
|
@ -132,10 +132,8 @@ async function getImage(imgPath: string) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export async function getMemberImagePath(name: string, currentTeam: boolean) { |
|
|
|
|
const imgPath = currentTeam |
|
|
|
|
? path.join("images", "team", name.replace(" ", "")) |
|
|
|
|
: path.join("images", "team", name.replace(" ", "")); |
|
|
|
|
export async function getMemberImagePath(name: string) { |
|
|
|
|
const imgPath = path.join("images", "team", name.replace(" ", "")); |
|
|
|
|
const placeholder = path.join( |
|
|
|
|
"images", |
|
|
|
|
"team", |
|
|
|
|