Remove promise.all implementation

This commit is contained in:
Aditya Thakral 2021-09-20 17:08:01 -04:00
parent e2f033aea1
commit 37bf2d4e6d
1 changed files with 0 additions and 27 deletions

View File

@ -112,33 +112,6 @@ export async function getUpcomingEvents(): Promise<Event[]> {
}
export async function getAllEvents() {
/* Promise.all implementation
const slugs = (
await Promise.all(
(
await getEventYears()
).map(
async (year) =>
await Promise.all(
(
await getEventTermsByYear(year)
).map(async (term) => {
return (await getEventsByTerm(year, term)).map((slug) => ({
slug,
term,
year,
}));
})
)
)
)
).flat(2);
return await Promise.all(
slugs.map(({ year, term, slug }) => getEventBySlug(year, term, slug))
);
*/
const events: Event[] = [];
for (const year of await getEventYears()) {