🔧 Fixes to search listing

This commit is contained in:
2021-10-11 08:52:39 -07:00
parent 63fecd4592
commit 53b7e94135
4 changed files with 43 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
import { flatten, compact, map, isEmpty } from "lodash";
import axios from "axios";
export const detectIssueTypes = (deck: string): any => {
const issueTypeMatchers = [
@@ -12,6 +13,15 @@ export const detectIssueTypes = (deck: string): any => {
{ regex: [/mini\Wseries/gim], displayName: "Mini-Series" },
];
// const issueNames = await axios.request({
// url: "http://localhost:3000/api/import/scrapeIssueNamesFromDOM",
// method: "POST",
// data: {
// html: deck,
// },
// });
// console.log(deck);
// console.log("DOM", issueNames);
const matches = map(issueTypeMatchers, (matcher) => {
return getIssueTypeDisplayName(deck, matcher.regex, matcher.displayName);
});