refactor: types dir import
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeAnimeAboutInfo } from "../parsers/index.js";
|
||||
import { type AnimeAboutInfoQueryParams } from "../models/controllers/index.js";
|
||||
import { type AnimeAboutInfoQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/info?id=${anime-id}
|
||||
const getAnimeAboutInfo: RequestHandler<
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import createHttpError from "http-errors";
|
||||
import type { RequestHandler } from "express";
|
||||
import type { AnimeCategories } from "../models/anime.js";
|
||||
import type { AnimeCategories } from "../types/anime.js";
|
||||
import { scrapeAnimeCategory } from "../parsers/index.js";
|
||||
import type {
|
||||
CategoryAnimePathParams,
|
||||
CategoryAnimeQueryParams,
|
||||
} from "../models/controllers/index.js";
|
||||
} from "../types/controllers/index.js";
|
||||
|
||||
// /anime/:category?page=${page}
|
||||
const getAnimeCategory: RequestHandler<
|
||||
|
||||
@@ -4,8 +4,8 @@ import { type RequestHandler } from "express";
|
||||
import { type CheerioAPI, load } from "cheerio";
|
||||
import { scrapeAnimeEpisodeSources } from "../parsers/index.js";
|
||||
import { USER_AGENT_HEADER, SRC_BASE_URL } from "../utils/constants.js";
|
||||
import { type AnimeServers, Servers } from "../models/anime.js";
|
||||
import { type AnimeEpisodeSrcsQueryParams } from "../models/controllers/index.js";
|
||||
import { type AnimeServers, Servers } from "../types/anime.js";
|
||||
import { type AnimeEpisodeSrcsQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
type AnilistID = number | null;
|
||||
type MalID = number | null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeAnimeEpisodes } from "../parsers/index.js";
|
||||
import { type AnimeEpisodePathParams } from "../models/controllers/index.js";
|
||||
import { type AnimeEpisodePathParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/episodes/${anime-id}
|
||||
const getAnimeEpisodes: RequestHandler<
|
||||
|
||||
@@ -4,7 +4,7 @@ import { scrapeGenreAnime } from "../parsers/index.js";
|
||||
import type {
|
||||
GenreAnimePathParams,
|
||||
GenreAnimeQueryParams,
|
||||
} from "../models/controllers/index.js";
|
||||
} from "../types/controllers/index.js";
|
||||
|
||||
// /anime/genre/${name}?page=${page}
|
||||
const getGenreAnime: RequestHandler<
|
||||
|
||||
@@ -4,7 +4,7 @@ import { scrapeProducerAnimes } from "../parsers/index.js";
|
||||
import type {
|
||||
AnimeProducerPathParams,
|
||||
AnimeProducerQueryParams,
|
||||
} from "../models/controllers/index.js";
|
||||
} from "../types/controllers/index.js";
|
||||
|
||||
// /anime/producer/${name}?page=${page}
|
||||
const getProducerAnimes: RequestHandler<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeAnimeSearch } from "../parsers/index.js";
|
||||
import { type AnimeSearchQueryParams } from "../models/controllers/index.js";
|
||||
import { type AnimeSearchQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/search?q=${query}&page=${page}
|
||||
const getAnimeSearch: RequestHandler<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeAnimeSearchSuggestion } from "../parsers/index.js";
|
||||
import { type AnimeSearchSuggestQueryParams } from "../models/controllers/index.js";
|
||||
import { type AnimeSearchSuggestQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/search/suggest?q=${query}
|
||||
const getAnimeSearchSuggestion: RequestHandler<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeEpisodeServers } from "../parsers/index.js";
|
||||
import { type EpisodeServersQueryParams } from "../models/controllers/index.js";
|
||||
import { type EpisodeServersQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/servers?episodeId=${id}
|
||||
const getEpisodeServers: RequestHandler<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import createHttpError from "http-errors";
|
||||
import { type RequestHandler } from "express";
|
||||
import { scrapeEstimatedSchedule } from "../parsers/index.js";
|
||||
import { type EstimatedScheduleQueryParams } from "../models/controllers/index.js";
|
||||
import { type EstimatedScheduleQueryParams } from "../types/controllers/index.js";
|
||||
|
||||
// /anime/schedule?date=${date}
|
||||
const getEstimatedSchedule: RequestHandler<
|
||||
|
||||
Reference in New Issue
Block a user