fix(api): fix update team settings and make request schema type-safe

This commit is contained in:
yiling
2026-06-30 14:41:50 +08:00
parent d32707d038
commit 34a69a33bf
5 changed files with 34 additions and 15 deletions
+10 -1
View File
@@ -306,7 +306,16 @@ export class TeamService {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const settings = (team.settings || {}) as any
settings[key] = value
if (key === 'transcode.videoStrategy') {
if (!settings.transcode) {
settings.transcode = {}
}
settings.transcode.videoStrategy = value
delete settings['transcode.videoStrategy']
} else {
settings[key] = value
}
const updated = await prisma.team.update({
where: { id: teamId },