Test optimize image
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
e05481dc9c
commit
5fec0d6bbb
10
lib/team.ts
10
lib/team.ts
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue