Remove unneeded dirent conversion
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jared He 2021-08-16 22:56:14 -05:00
parent 057c2c2a03
commit b32fd53d95
1 changed files with 1 additions and 6 deletions

View File

@ -58,12 +58,7 @@ export async function getEventsByTerm(
year: string,
term: string
): Promise<string[]> {
return (
await fs.readdir(path.join(EVENTS_PATH, year, term), {
withFileTypes: true,
})
)
.map((dirent) => dirent.name)
return (await fs.readdir(path.join(EVENTS_PATH, year, term)))
.filter((name) => name.endsWith(".md"))
.map((name) => name.slice(0, -".md".length));
}