迁移播放记录到新数据结构,新增自动清理播放记录
This commit is contained in:
@@ -201,6 +201,13 @@ export async function POST(req: NextRequest) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 标记播放记录已迁移(新导入的数据直接使用hash结构)
|
||||
const storage = (db as any).storage;
|
||||
if (storage && typeof storage.client?.hSet === 'function') {
|
||||
const userInfoKey = `user:${username}:info`;
|
||||
await storage.client.hSet(userInfoKey, 'playrecord_migrated', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
|
||||
Reference in New Issue
Block a user