fix: 完善成人内容过滤功能的部署兼容性

- 为用户设置API添加Edge Runtime配置确保部署兼容性
- 完善所有存储后端的用户设置方法实现
- 为D1数据库添加user_settings表迁移脚本
- 修复TypeScript类型错误和构建兼容性
- 所有25个API路由现在都正确配置了Edge Runtime
- 确保Docker、Cloudflare Pages等各平台部署正常运行
This commit is contained in:
katelya
2025-09-04 21:25:45 +08:00
parent 86ebbb2cf6
commit b06665788f
6 changed files with 161 additions and 3 deletions
+3
View File
@@ -4,6 +4,9 @@ import { NextRequest, NextResponse } from 'next/server';
import { getStorage } from '@/lib/db';
import { UserSettings } from '@/lib/types';
// 设置运行时为 Edge Runtime,确保部署兼容性
export const runtime = 'edge';
// 获取用户设置
export async function GET(_request: NextRequest) {
try {