feat: create routes to load popular titles
This commit is contained in:
@@ -2,9 +2,9 @@ import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
|
||||
|
||||
import { fetchFromMultipleSources } from "~/libs/fetchFromMultipleSources";
|
||||
import { PaginatedResponseSchema } from "~/types/schema";
|
||||
import { HomeTitle } from "~/types/title/homeTitle";
|
||||
|
||||
import { fetchSearchResultsFromAnilist } from "./anilist";
|
||||
import { SearchResult } from "./searchResult";
|
||||
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
@@ -25,7 +25,7 @@ const route = createRoute({
|
||||
200: {
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: PaginatedResponseSchema(SearchResult),
|
||||
schema: PaginatedResponseSchema(HomeTitle),
|
||||
},
|
||||
},
|
||||
description: "Returns a list of paginated results for the query",
|
||||
|
||||
Reference in New Issue
Block a user