修复关系型数据库保存音乐记录错误,播放记录修改为队列式

This commit is contained in:
mtvpls
2026-05-09 10:25:39 +08:00
parent 2480b4d28b
commit a8cacf3e60
6 changed files with 54 additions and 14 deletions
+2
View File
@@ -25,6 +25,8 @@ export async function GET(request: NextRequest) {
if (!username) return unauthorized();
try {
// 注意:records 按“播放队列顺序”返回(createdAt ASC),
// 前端再基于 lastPlayedAt 定位当前播放项。
const records = await db.listMusicV2History(username);
return NextResponse.json({ success: true, data: { records } });
} catch (error) {