From 8586178657f967428b7cce3d6b532a743ed81490 Mon Sep 17 00:00:00 2001 From: Artemy Date: Mon, 14 Aug 2023 13:57:03 +0300 Subject: [PATCH] refactor: rename getCorrespondingReaderView rename getCorrespondingReaderView to handlePage --- src/routes/getRoute.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/getRoute.ts b/src/routes/getRoute.ts index 4e3d198..832865c 100644 --- a/src/routes/getRoute.ts +++ b/src/routes/getRoute.ts @@ -1,5 +1,5 @@ import NodeCache from "node-cache"; -import getCorrespondingReaderView from "../handlers/main"; +import handlePage from "../handlers/main"; import { GetRequest } from "../types/requests"; import { FastifyInstance } from "fastify"; @@ -13,7 +13,7 @@ export default function getRoute(cache: NodeCache) { ? "text/html; charset=utf-8" : "text/plain; charset=utf-8"; - const parsed = await getCorrespondingReaderView(url); + const parsed = await handlePage(url); const content = type === "html" ? parsed?.content : parsed?.textContent; cache.set(req.originalUrl || req.url, {