refactor: separate api
This commit is contained in:
parent
834c8ef23a
commit
9249bfa19e
@ -5,7 +5,7 @@ import { generateRequestUrl } from "../utils/generate";
|
|||||||
|
|
||||||
export default async function parseRoute(fastify: FastifyInstance) {
|
export default async function parseRoute(fastify: FastifyInstance) {
|
||||||
fastify.get<IParseSchema>(
|
fastify.get<IParseSchema>(
|
||||||
"/parse",
|
"/api/parse",
|
||||||
{ schema: parseSchema },
|
{ schema: parseSchema },
|
||||||
async (request: EngineRequest) => {
|
async (request: EngineRequest) => {
|
||||||
return await handlePage(
|
return await handlePage(
|
||||||
|
@ -6,7 +6,7 @@ import { generateRequestUrl } from "../utils/generate";
|
|||||||
|
|
||||||
export default async function rawHtml(fastify: FastifyInstance) {
|
export default async function rawHtml(fastify: FastifyInstance) {
|
||||||
fastify.get<IParseSchema>(
|
fastify.get<IParseSchema>(
|
||||||
"/raw-html",
|
"/api/raw-html",
|
||||||
{ schema: rawHtmlSchema },
|
{ schema: rawHtmlSchema },
|
||||||
async (request: GetRequest) => {
|
async (request: GetRequest) => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user