-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor to build api at compile time
- Loading branch information
mattk
committed
Aug 6, 2024
1 parent
41ce1e8
commit 012fe20
Showing
2 changed files
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { RogueApp } from './types'; | ||
|
||
export async function getRogueApps(): Promise<RogueApp[]> { | ||
export function getRogueApps() { | ||
const filePath = path.join(process.cwd(), 'public', 'rogueapps.json'); | ||
const jsonData = fs.readFileSync(filePath, 'utf8'); | ||
const rogueApps: RogueApp[] = JSON.parse(jsonData); | ||
const rogueApps = JSON.parse(jsonData); | ||
return rogueApps; | ||
} |