🤼‍♀️ Wiring up ES-powered issue detection

This commit is contained in:
2022-02-01 23:19:43 -08:00
parent d819bac7f2
commit 1d317abbdb
7 changed files with 131 additions and 49 deletions

View File

@@ -13,6 +13,7 @@ import {
IMS_COMIC_BOOK_ARCHIVE_EXTRACTION_CALL_IN_PROGRESS,
CV_ISSUES_METADATA_CALL_IN_PROGRESS,
CV_ISSUES_METADATA_FETCH_SUCCESS,
CV_CLEANUP,
} from "../constants/action-types";
import {
COMICBOOKINFO_SERVICE_URI,
@@ -64,24 +65,24 @@ export const comicinfoAPICall = (options) => async (dispatch) => {
});
}
};
export const getIssuesForSeries = (comicObjectID: any) => async (dispatch) => {
dispatch({
type: CV_ISSUES_METADATA_CALL_IN_PROGRESS,
});
export const findIssuesForSeriesInLibrary =
(comicObjectID: any) => async (dispatch) => {
dispatch({
type: CV_ISSUES_METADATA_CALL_IN_PROGRESS,
});
dispatch({
type: CV_CLEANUP,
});
await axios({
url: `${IMPORT_SERVICE_BASE_URI}/findIssuesForSeriesInLibrary`,
method: "POST",
params: {
comicObjectID,
},
});
};
const issues = await axios({
url: `${IMPORT_SERVICE_BASE_URI}/getIssuesForSeries`,
method: "POST",
params: {
comicObjectID,
},
});
console.log(issues);
dispatch({
type: CV_ISSUES_METADATA_FETCH_SUCCESS,
issues,
});
};
export const getComicBookDetailById =
(comicBookObjectId: string) => async (dispatch) => {
dispatch({