refactor: rename mockData.ts to mocks.ts and update import paths.

This commit is contained in:
2025-12-16 08:04:26 -05:00
parent 45bf96e764
commit 9b17f5bcfe
6 changed files with 5 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ app.openapi(route, async (c) => {
// Check if we should use mock data
const { useMockData } = await import("~/libs/useMockData");
if (useMockData()) {
const { mockEpisodes } = await import("~/mocks/mockData");
const { mockEpisodes } = await import("~/mocks");
return c.json({
success: true,

View File

@@ -123,7 +123,7 @@ app.openapi(route, async (c) => {
// Check if we should use mock data
const { useMockData } = await import("~/libs/useMockData");
if (useMockData()) {
const { mockEpisodeUrl } = await import("~/mocks/mockData");
const { mockEpisodeUrl } = await import("~/mocks");
return c.json({ success: true, result: mockEpisodeUrl });
}

View File

@@ -41,7 +41,7 @@ app.openapi(route, async (c) => {
// Check if we should use mock data
const { useMockData } = await import("~/libs/useMockData");
if (useMockData()) {
const { mockSearchResults } = await import("~/mocks/mockData");
const { mockSearchResults } = await import("~/mocks");
// Paginate mock results
const startIndex = (page - 1) * limit;

View File

@@ -49,7 +49,7 @@ app.openapi(route, async (c) => {
// Check if we should use mock data
const { useMockData } = await import("~/libs/useMockData");
if (useMockData()) {
const { mockTitleDetails } = await import("~/mocks/mockData");
const { mockTitleDetails } = await import("~/mocks");
return c.json({ success: true, result: mockTitleDetails() }, 200);
}

View File

@@ -8,7 +8,7 @@ export async function fetchTitleFromAnilist(
token?: string | undefined,
): Promise<Title | undefined> {
if (useMockData()) {
const { mockTitleDetails } = await import("~/mocks/mockData");
const { mockTitleDetails } = await import("~/mocks");
return mockTitleDetails();
}