aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-07 14:52:33 +0530
committerRitesh Ghosh <[email protected]>2023-08-07 14:52:33 +0530
commita264054d97ffc9dbf4d7a45b7970318b8922a273 (patch)
treeb716e609ef81e24dfb23c2b3b75ab1d04e6b6039
parent96348cd9999a6fbf0bef82d79fdd8a389f5a6c23 (diff)
downloadaniwatch-api-a264054d97ffc9dbf4d7a45b7970318b8922a273.tar.xz
aniwatch-api-a264054d97ffc9dbf4d7a45b7970318b8922a273.zip
chore(imports): refactored anime & parser type imports
-rw-r--r--src/parsers/animeAboutInfo.ts2
-rw-r--r--src/parsers/animeCategory.ts3
-rw-r--r--src/parsers/animeGenre.ts6
-rw-r--r--src/parsers/animeSearch.ts2
-rw-r--r--src/parsers/homePage.ts2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/parsers/animeAboutInfo.ts b/src/parsers/animeAboutInfo.ts
index baa0eb4..1a2bf72 100644
--- a/src/parsers/animeAboutInfo.ts
+++ b/src/parsers/animeAboutInfo.ts
@@ -10,7 +10,7 @@ import {
} from "../utils";
import createHttpError, { HttpError } from "http-errors";
-import { ScrapedAnimeAboutInfo } from "../models";
+import { ScrapedAnimeAboutInfo } from "../models/parsers";
// /anime/info?id=${anime-id}
async function scrapeAnimeAboutInfo(
diff --git a/src/parsers/animeCategory.ts b/src/parsers/animeCategory.ts
index ffdd91c..7afe74c 100644
--- a/src/parsers/animeCategory.ts
+++ b/src/parsers/animeCategory.ts
@@ -9,8 +9,9 @@ import {
extractTop10Animes,
} from "../utils";
+import { AnimeCategories } from "../models/anime";
import createHttpError, { HttpError } from "http-errors";
-import { ScrapedAnimeCategory, AnimeCategories } from "../models";
+import { ScrapedAnimeCategory } from "../models/parsers";
// /anime/:category?page=${page}
async function scrapeAnimeCategory(
diff --git a/src/parsers/animeGenre.ts b/src/parsers/animeGenre.ts
index aed166b..86470bb 100644
--- a/src/parsers/animeGenre.ts
+++ b/src/parsers/animeGenre.ts
@@ -1,5 +1,7 @@
import axios, { AxiosError } from "axios";
+import createHttpError, { HttpError } from "http-errors";
import { load, CheerioAPI, SelectorType } from "cheerio";
+
import {
SRC_BASE_URL,
ACCEPT_HEADER,
@@ -8,9 +10,7 @@ import {
extractMostPopularAnimes,
extractAnimes,
} from "../utils";
-
-import createHttpError, { HttpError } from "http-errors";
-import { ScrapedGenreAnime } from "../models";
+import { ScrapedGenreAnime } from "../models/parsers";
// /anime/genre/${name}?page=${page}
async function scrapeGenreAnime(
diff --git a/src/parsers/animeSearch.ts b/src/parsers/animeSearch.ts
index 1c3c5f9..2656d35 100644
--- a/src/parsers/animeSearch.ts
+++ b/src/parsers/animeSearch.ts
@@ -10,7 +10,7 @@ import {
} from "../utils";
import createHttpError, { HttpError } from "http-errors";
-import { ScrapedAnimeSearchResult } from "../models";
+import { ScrapedAnimeSearchResult } from "../models/parsers";
// /anime/search?q=${query}&page=${page}
async function scrapeAnimeSearch(
diff --git a/src/parsers/homePage.ts b/src/parsers/homePage.ts
index 1c3acd0..4920145 100644
--- a/src/parsers/homePage.ts
+++ b/src/parsers/homePage.ts
@@ -10,7 +10,7 @@ import {
} from "../utils";
import createHttpError, { HttpError } from "http-errors";
-import { ScrapedHomePage } from "../models";
+import { ScrapedHomePage } from "../models/parsers";
// /anime/home
async function scrapeHomePage(): Promise<ScrapedHomePage | HttpError> {