From b7255bd6c54a8cf56040bebb0cee7c0355876cb3 Mon Sep 17 00:00:00 2001 From: Nikhil Nawgiri Date: Sat, 26 Oct 2024 18:47:48 +0200 Subject: [PATCH] Use saveJsonToDisk in main func --- be/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/be/src/main.ts b/be/src/main.ts index 6b02ec7..d7d80ba 100644 --- a/be/src/main.ts +++ b/be/src/main.ts @@ -1,4 +1,5 @@ import { fetchFromApi } from "./fetchItemsFromJellyfin.ts"; +import { saveJsonToDisk } from "./fsHelper.ts"; import { transformItems } from "./itemHelper.ts"; interface JellyfinApiResponse { @@ -18,7 +19,8 @@ const run = async () => { console.log("transformedItems:", transformedItems); console.log("totalItemCount:", totalItemCount); - // write to db file + saveJsonToDisk({ totalItemCount, items: transformedItems }); + // update db file }