final fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
00caa70143
commit
cafdf334fe
13
lib/team.ts
13
lib/team.ts
|
@ -95,28 +95,25 @@ export async function getExec(name: string, pos: string, convert = true) {
|
||||||
const raw = await readFile(path.join(EXECS_PATH, `${name}${fileType}`));
|
const raw = await readFile(path.join(EXECS_PATH, `${name}${fileType}`));
|
||||||
({ content, data: metadata } = matter(raw));
|
({ content, data: metadata } = matter(raw));
|
||||||
|
|
||||||
const image =
|
const image = await getMemberImagePath(metadata.name);
|
||||||
(metadata.image as string | undefined) ??
|
|
||||||
(await getMemberImagePath(metadata.name));
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: convert ? await serialize(content) : content,
|
content: convert ? await serialize(content) : content,
|
||||||
metadata: { ...metadata, image } as Metadata,
|
metadata: { ...metadata, image } as Metadata,
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
// Capitalize the first letter of the first name and last name
|
||||||
const firstName =
|
const firstName =
|
||||||
name.split("-")[0][0].toUpperCase() + name.split("-")[0].slice(1);
|
name.split("-")[0][0].toUpperCase() + name.split("-")[0].slice(1);
|
||||||
const lastName =
|
const lastName =
|
||||||
name.split("-")[1][0].toUpperCase() + name.split("-")[1].slice(1);
|
name.split("-")[1][0].toUpperCase() + name.split("-")[1].slice(1);
|
||||||
|
|
||||||
const posName = execPositions[pos];
|
const posName = execPositions[pos];
|
||||||
({ content, metadata } = {
|
content = "Coming Soon";
|
||||||
content: "Coming soon!",
|
metadata = {
|
||||||
metadata: {
|
|
||||||
name: `${firstName} ${lastName}`,
|
name: `${firstName} ${lastName}`,
|
||||||
role: `${posName}`,
|
role: `${posName}`,
|
||||||
},
|
};
|
||||||
});
|
|
||||||
|
|
||||||
const image = await getMemberImagePath(metadata.name);
|
const image = await getMemberImagePath(metadata.name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue