diff --git a/fe/src/helper/internalApiHelper.ts b/fe/src/helper/internalApiHelper.ts new file mode 100644 index 0000000..06752d1 --- /dev/null +++ b/fe/src/helper/internalApiHelper.ts @@ -0,0 +1,11 @@ +const buildApiUrl = (imdbId: string) => `http://localhost:1312/check/${imdbId}`; + +export const getItemStatusInLibrary = async (imdbId: string) => { + if (imdbId.length > 0) { + fetch(buildApiUrl(imdbId)) + .then(response => response.json()) + .then(data => { + console.log("data:", data); + }); + } +}