feat(phase3a): 음악 서비스 공개화 — 가드·HideableService·DEFAULT_SERVICES 정리

- app/music/layout.tsx: isServiceVisible/notFound 제거, metadata 유지
- lib/service-visibility.ts: HideableService type에서 'music' 제거 (gyeol|lotto만 유지)
- app/api/admin/services/route.ts: DEFAULT_SERVICES에서 music 행 제거

/music* 라우트가 이제 공개(static) 상태로 노출됨.
service_settings music DELETE는 Task 1 마이그레이션이 담당.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 12:51:54 +09:00
parent 7100842179
commit 0742059db2
3 changed files with 2 additions and 6 deletions

View File

@@ -51,7 +51,6 @@ export async function PATCH(request: Request) {
} }
const DEFAULT_SERVICES = [ const DEFAULT_SERVICES = [
{ id: 'music', name: 'AI 음악 팩', description: '음악 가이드 패키지·샘플·스튜디오', is_active: false, order_index: 102 },
{ id: 'gyeol', name: 'CONTOUR 설문', description: '/gyeol PMF 설문', is_active: false, order_index: 103 }, { id: 'gyeol', name: 'CONTOUR 설문', description: '/gyeol PMF 설문', is_active: false, order_index: 103 },
{ id: 'lotto', name: '로또 추천', description: '로또 번호 추천 노출', is_active: false, order_index: 105 }, { id: 'lotto', name: '로또 추천', description: '로또 번호 추천 노출', is_active: false, order_index: 105 },
]; ];

View File

@@ -1,13 +1,10 @@
import { notFound } from 'next/navigation';
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import { isServiceVisible } from '@/lib/service-visibility';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'AI 음악 제품', title: 'AI 음악 제품',
description: 'Suno 프롬프트 + 뮤직비디오 워크플로우 + 유튜브 SEO 템플릿 한 팩에. 1시간 만에 음악·뮤비 완성.', description: 'Suno 프롬프트 + 뮤직비디오 워크플로우 + 유튜브 SEO 템플릿 한 팩에. 1시간 만에 음악·뮤비 완성.',
}; };
export default async function MusicLayout({ children }: { children: React.ReactNode }) { export default function MusicLayout({ children }: { children: React.ReactNode }) {
if (!(await isServiceVisible('music'))) notFound();
return <>{children}</>; return <>{children}</>;
} }

View File

@@ -3,7 +3,7 @@ import { createAdminClient } from '@/lib/supabase/admin';
import { verifyAdminTokenNode } from '@/lib/admin-auth'; import { verifyAdminTokenNode } from '@/lib/admin-auth';
/** 숨김 가능 서비스 id (service_settings.id와 일치) */ /** 숨김 가능 서비스 id (service_settings.id와 일치) */
export type HideableService = 'music' | 'gyeol' | 'lotto'; export type HideableService = 'gyeol' | 'lotto';
/** /**
* 서비스 노출 여부. admin_token 세션이면 항상 true. * 서비스 노출 여부. admin_token 세션이면 항상 true.