pipe json files

This commit is contained in:
g1nt0ki
2024-07-11 19:15:42 +03:00
parent 112f092989
commit 24e52da615
6 changed files with 98 additions and 66 deletions

View File

@@ -36,6 +36,10 @@ export async function readRouteData(subPath: string) {
return readFileData(subPath)
}
export function getRouteDataPath(subPath: string) {
return path.join(ROUTES_DATA_DIR, subPath)
}
async function storeData(subPath: string, data: any) {
const filePath = path.join(CACHE_DIR!, subPath)
const dirPath = path.dirname(filePath)