diff --git a/src/client/constants/endpoints.js b/src/client/constants/endpoints.ts similarity index 58% rename from src/client/constants/endpoints.js rename to src/client/constants/endpoints.ts index 203f0a9..7edb72b 100644 --- a/src/client/constants/endpoints.js +++ b/src/client/constants/endpoints.ts @@ -1,3 +1,3 @@ export const COMICBOOKINFO_SERVICE_URI = "http://localhost:6050/api/comicbookinfo/"; -export const FOLDERUTIL_URI = "http://localhost:8050/api/"; +export const FS_API_BASE_URI = "http://localhost:8050/api/"; diff --git a/src/client/shared/utils/folder.utils.ts b/src/client/shared/utils/folder.utils.ts index 2d43c55..09d7072 100644 --- a/src/client/shared/utils/folder.utils.ts +++ b/src/client/shared/utils/folder.utils.ts @@ -7,7 +7,7 @@ import { } from "../../../server/interfaces/folder.interface"; import { FS_API_BASE_URI } from "../../constants/endpoints"; -export async function folderWalk(): Promise> { +export async function walkFolder(path: string): Promise> { return axios .request>({ url: FS_API_BASE_URI + "/walkFolder", @@ -28,6 +28,9 @@ export async function extractCoverFromComicBookArchive( > { return await axios.request({ url: FS_API_BASE_URI + "/getComicCovers", + data: { + ...options, + }, }); } diff --git a/src/client/workers/extractCovers.worker.ts b/src/client/workers/extractCovers.worker.ts index 236ad81..452b118 100644 --- a/src/client/workers/extractCovers.worker.ts +++ b/src/client/workers/extractCovers.worker.ts @@ -1,4 +1,5 @@ import * as Comlink from "comlink"; +import { extractCoverFromComicBookArchive } from "../shared/utils/folder.utils"; function add(a, b) { return a + b;