fix: add back remaining mock data paths

This commit is contained in:
2025-12-06 18:20:38 -05:00
parent 408325db40
commit d2402577ce
2 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import { useMockData } from "~/libs/useMockData";
import { FetchUrlResponse } from "~/types/episode/fetch-url-response";
import { fetchEpisodes } from "../getByAniListId";
@@ -13,6 +14,11 @@ export async function fetchEpisodeUrl({
aniListId: number;
episodeNumber: number;
}): Promise<FetchUrlResponse | null> {
if (useMockData()) {
const { mockEpisodeUrl } = await import("~/mocks");
return { success: true, result: mockEpisodeUrl };
}
try {
let episodeId = id;
if (!id) {