chore(cms): 清理旧版 CMS 客户端代码,完成 CMS 迁移
- 删除已废弃的 CMS 客户端代码:mock-data、registry、client、storage、renderers 等 - 删除已归档的 CMS 页面组件:home-content-cms、news-content-cms、services-content-cms 等 - 删除 CMS Studio 页面 - 将 CaseStudyData 类型移至 types.ts,统一类型定义 - 移除 content-types 对 registry 的依赖,内联 ContentTypeConfig - 修复测试文件中对已删除 mock-data 的引用 - 添加 site-config 和 navigation 内容模型种子数据 - 更新 revalidate API 路由使用 CONTENT_TYPE_CONFIGS 共修改 34 个文件,+132 / -5993 行
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { revalidatePath, revalidateTag } from 'next/cache';
|
||||
import {
|
||||
getContentTypeConfig,
|
||||
getAllContentTypeConfigs,
|
||||
} from '@/lib/cms/registry';
|
||||
import { CONTENT_TYPE_CONFIGS } from '@/lib/cms/content-types';
|
||||
|
||||
function getContentTypeConfig(code: string) {
|
||||
return CONTENT_TYPE_CONFIGS[code as keyof typeof CONTENT_TYPE_CONFIGS] ?? null;
|
||||
}
|
||||
|
||||
function getAllContentTypeConfigs() {
|
||||
return Object.values(CONTENT_TYPE_CONFIGS);
|
||||
}
|
||||
|
||||
interface RevalidateRequestBody {
|
||||
event?: string;
|
||||
|
||||
Reference in New Issue
Block a user