Rename functions
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b32fd53d95
commit
fecd3bf3e0
|
@ -8,14 +8,14 @@ import { serialize } from "next-mdx-remote/serialize";
|
||||||
const EVENTS_PATH = path.join("content", "events");
|
const EVENTS_PATH = path.join("content", "events");
|
||||||
const TERMS = ["winter", "spring", "fall"];
|
const TERMS = ["winter", "spring", "fall"];
|
||||||
|
|
||||||
export async function getYears(): Promise<string[]> {
|
export async function getEventYears(): Promise<string[]> {
|
||||||
return (await fs.readdir(EVENTS_PATH, { withFileTypes: true }))
|
return (await fs.readdir(EVENTS_PATH, { withFileTypes: true }))
|
||||||
.filter((dirent) => dirent.isDirectory())
|
.filter((dirent) => dirent.isDirectory())
|
||||||
.map((dirent) => dirent.name)
|
.map((dirent) => dirent.name)
|
||||||
.sort();
|
.sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getTermsByYear(year: string): Promise<string[]> {
|
export async function getEventTermsByYear(year: string): Promise<string[]> {
|
||||||
return (
|
return (
|
||||||
await fs.readdir(path.join(EVENTS_PATH, year), { withFileTypes: true })
|
await fs.readdir(path.join(EVENTS_PATH, year), { withFileTypes: true })
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue