File size: 427 Bytes
11acfd9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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;
|