blob: 36e1fe9c31a7151f8cc67802b47df025bf5b3349 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { type RequestHandler } from "express";
import { scrapeHomePage } from "../parsers/index.js";
// /anime/home
const getHomePageInfo: RequestHandler<
unknown,
Awaited<ReturnType<typeof scrapeHomePage>>
> = async (req, res, next) => {
try {
const data = await scrapeHomePage();
res.status(200).json(data);
} catch (err: any) {
console.error(err);
next(err);
}
};
export default getHomePageInfo;
|