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
+11 -1
View File
@@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
})
}
if (!['SONG_ADMIN', 'ADMIN', 'SUPER_ADMIN'].includes(user.role)) {
if (!['ADMIN', 'SUPER_ADMIN'].includes(user.role)) {
throw createError({
statusCode: 403,
message: '只有管理员才能添加播出时段'
@@ -84,6 +84,16 @@ export default defineEventHandler(async (event) => {
.returning()
const newPlayTime = newPlayTimeResult[0]
// 清除相关缓存
try {
const { cache } = await import('~~/server/utils/cache-helpers')
await cache.deletePattern('schedules:*')
await cache.deletePattern('playtimes:*')
console.log('[Cache] 排期和播放时间缓存已清除(创建播放时间)')
} catch (cacheError) {
console.warn('清除缓存失败:', cacheError)
}
return newPlayTime
} catch (error: any) {
console.error('创建播出时段失败:', error)