Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
CloudSyncOutlined,
DashboardOutlined,
FileTextOutlined,
FolderOpenOutlined,
Expand All @@ -13,7 +12,6 @@ import type { MenuProps } from "antd";
import type { ReactNode } from "react";
import { Link, Navigate, Outlet, Route, Routes, useLocation, useNavigate } from "react-router";

import { BatchPage } from "../pages/BatchPage";
import { CollectionsPage } from "../pages/CollectionsPage";
import { ContentPage } from "../pages/ContentPage";
import { LoginPage } from "../pages/LoginPage";
Expand Down Expand Up @@ -51,11 +49,6 @@ const navigationItems: MenuProps["items"] = [
key: "/admin/terms",
icon: <FileTextOutlined />,
label: <Link to="/admin/terms">약관 관리</Link>
},
{
key: "/admin/batch",
icon: <CloudSyncOutlined />,
label: <Link to="/admin/batch">데이터 업데이트</Link>
}
];

Expand Down Expand Up @@ -143,7 +136,6 @@ export function App() {
<Route path="collections" element={<CollectionsPage />} />
<Route path="moderation" element={<ModerationPage />} />
<Route path="terms" element={<TermsPage />} />
<Route path="batch" element={<BatchPage />} />
</Route>
<Route path="*" element={<Navigate to="/admin/overview" replace />} />
</Routes>
Expand Down
142 changes: 0 additions & 142 deletions src/pages/BatchPage.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions src/shared/api/adminEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import type {
AdminLoginRes,
AdminRefreshTokenReq,
AdminUserStatisticsRes,
BatchJobExecutionRes,
BatchTriggerReq,
CollectionModerationStatus,
MediaType,
PaginationResponse,
Expand Down Expand Up @@ -124,35 +122,6 @@ export function createTerms(request: TermsCreateReq) {
});
}

export function triggerBatch(request: BatchTriggerReq) {
const mediaType = request.mediaType ?? "MOVIE";

if (request.type === "movies") {
return postBatch("/admin/batch/movies", { date: request.date });
}

if (request.type === "tv") {
return postBatch("/admin/batch/tv", { date: request.date });
}

if (request.type === "ott") {
return postBatch("/admin/batch/ott", { mediaType });
}

return postBatch("/admin/batch/delta", {
mediaType,
startDate: request.startDate,
endDate: request.endDate
});
}

function postBatch(path: string, params: object) {
return adminApi<BatchJobExecutionRes>(withQuery(path, params), {
method: "POST",
rawResponse: true
});
}

function withQuery(path: string, params: object) {
const searchParams = new URLSearchParams();

Expand Down
17 changes: 0 additions & 17 deletions src/shared/api/adminTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,3 @@ export interface TermsRes {
required: boolean;
activeAt: string;
}

export type BatchType = "movies" | "tv" | "ott" | "delta";

export interface BatchTriggerReq {
type: BatchType;
date?: string;
mediaType?: MediaType;
startDate?: string;
endDate?: string;
}

export interface BatchJobExecutionRes {
jobName: string;
executionId: number;
status: string;
createTime: string;
}
22 changes: 1 addition & 21 deletions tests/e2e/admin-routes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ test("renders main admin routes", async ({ page }) => {
await expect(page.getByRole("heading", { name: "컬렉션" })).toBeVisible();
await page.goto("/admin/terms");
await expect(page.getByRole("heading", { name: "약관 관리" })).toBeVisible();
await page.goto("/admin/batch");
await expect(page.getByRole("heading", { name: "데이터 업데이트" })).toBeVisible();
});

test("opens moderation detail and resolves a report", async ({ page }) => {
Expand All @@ -60,7 +58,7 @@ test("opens moderation detail and resolves a report", async ({ page }) => {
await expect.poll(() => resolutionRequested).toBe(true);
});

test("submits content, terms, and batch mutations", async ({ page }) => {
test("submits content and terms mutations", async ({ page }) => {
await mockAdminApi(page);
await seedAdminSession(page);

Expand All @@ -87,10 +85,6 @@ test("submits content, terms, and batch mutations", async ({ page }) => {
await page.getByLabel("적용 시작 시각").press("Enter");
await page.getByRole("button", { name: "약관 생성" }).click();
await expect(page.getByText("약관 번호")).toBeVisible();

await page.goto("/admin/batch");
await page.getByRole("button", { name: "업데이트 시작" }).click();
await expect(page.getByRole("cell", { name: "영화 정보 가져오기" })).toBeVisible();
});

async function seedAdminSession(page: Page) {
Expand Down Expand Up @@ -232,20 +226,6 @@ async function mockAdminApi(page: Page, options: { onResolution?: () => void } =
return;
}

if (method === "POST" && pathname.includes("/admin/batch/")) {
await route.fulfill({
status: 200,
contentType: "application/json",
body: JSON.stringify({
jobName: "tmdbMovieImportJob",
executionId: 1,
status: "STARTED",
createTime: "2026-05-17T10:00:00"
})
});
return;
}

await route.fulfill({ status: 404, body: "Not mocked" });
});
}
Expand Down
Loading