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
@@ -5,7 +5,7 @@ import { createReplayRequestRejectedNotification } from '~~/server/services/noti
export default defineEventHandler(async (event) => {
// 检查管理员权限
const user = event.context.user
if (!user || !['SONG_ADMIN', 'ADMIN', 'SUPER_ADMIN'].includes(user.role)) {
if (!user || !['ADMIN', 'SUPER_ADMIN'].includes(user.role)) {
throw createError({ statusCode: 403, message: '权限不足' })
}
@@ -40,13 +40,15 @@ export default defineEventHandler(async (event) => {
.where(and(eq(songReplayRequests.songId, songId), eq(songReplayRequests.status, 'PENDING')))
// 发送通知
const ipAddress = getRequestIP(event, { xForwardedFor: true })
for (const req of pendingRequests) {
await createReplayRequestRejectedNotification(
req.userId,
{
title: song.title,
artist: song.artist
}
},
ipAddress
)
}