This repository has been archived on 2026-07-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
aniwatch-api/src/controllers/homePage.controller.ts
T
2023-11-22 13:55:59 +05:30

19 lines
427 B
TypeScript

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;