Test optimize image
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Rebecca-Chou 2022-06-01 22:01:13 -04:00
parent e05481dc9c
commit 5fec0d6bbb
1 changed files with 4 additions and 6 deletions

View File

@ -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",