Add internalApiHelper

This commit is contained in:
Nikhil Nawgiri 2024-11-02 18:42:04 +01:00
parent 843ef1395d
commit 9be03784d2

View file

@ -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);
});
}
}