From 9d416db8316922dacf3df06fd1fac77746413377 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Fri, 23 Apr 2021 11:08:16 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Renaming=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/constants/{endpoints.js => endpoints.ts} | 2 +- src/client/shared/utils/folder.utils.ts | 5 ++++- src/client/workers/extractCovers.worker.ts | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) rename src/client/constants/{endpoints.js => endpoints.ts} (58%) 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;