refactor: ♻️emoves Env parameter
Removes the `Env` parameter from several functions to simplify their signatures and rely on the global `env` for configuration. This change reduces the number of arguments passed around, making the code cleaner and easier to maintain.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
|
||||
|
||||
import type { Env } from "~/types/env";
|
||||
import { EpisodesResponseSchema } from "~/types/episode";
|
||||
import {
|
||||
AniListIdQuerySchema,
|
||||
@@ -37,7 +36,7 @@ const route = createRoute({
|
||||
},
|
||||
});
|
||||
|
||||
const app = new OpenAPIHono<Env>();
|
||||
const app = new OpenAPIHono<Cloudflare.Env>();
|
||||
|
||||
export function fetchEpisodes(aniListId: number, shouldRetry: boolean = false) {
|
||||
return import("./aniwatch")
|
||||
|
||||
Reference in New Issue
Block a user