fix: add back remaining mock data paths
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import { env } from "cloudflare:workers";
|
||||
|
||||
import { useMockData } from "~/libs/useMockData";
|
||||
import type { Title } from "~/types/title";
|
||||
|
||||
export async function fetchTitleFromAnilist(
|
||||
id: number,
|
||||
token?: string | undefined,
|
||||
): Promise<Title | undefined> {
|
||||
if (useMockData()) {
|
||||
const { mockTitleDetails } = await import("~/mocks");
|
||||
return mockTitleDetails();
|
||||
}
|
||||
|
||||
const durableObjectId = env.ANILIST_DO.idFromName(
|
||||
id.toString() + (token == null ? "" : "_" + token),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user