feat: 迁移自定义功能至 1.5.9.9 版本

包含音乐源限制、CI 防 OOM 优化、数据库连接池优化、管理端权限及 UI 细节定制等功能
This commit is contained in:
2026-09-12 19:26:42 +08:00
parent 34f0679117
commit 1106aeea6c
161 changed files with 18963 additions and 27900 deletions
+10
View File
@@ -2,6 +2,7 @@ import { createError, defineEventHandler, getRouterParam, readBody } from 'h3'
import { db } from '~/drizzle/db'
import { songBlacklists } from '~/drizzle/schema'
import { eq } from 'drizzle-orm'
import { CacheService } from '../../../services/cacheService'
export default defineEventHandler(async (event) => {
// 检查认证和权限
@@ -54,6 +55,15 @@ export default defineEventHandler(async (event) => {
.where(eq(songBlacklists.id, id))
.returning()
// 清除歌曲缓存(黑名单变更可能影响歌曲提交验证)
try {
const cacheService = CacheService.getInstance()
await cacheService.clearSongsCache()
console.log('黑名单更新后歌曲缓存已清除')
} catch (cacheError) {
console.warn('清除歌曲缓存失败:', cacheError)
}
return {
success: true,
message: '黑名单项更新成功',