Add internalApiHelper
This commit is contained in:
parent
843ef1395d
commit
9be03784d2
11
fe/src/helper/internalApiHelper.ts
Normal file
11
fe/src/helper/internalApiHelper.ts
Normal 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);
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue