Files
youtube-studio-flow/backend/src/modules/linting/rules/remote-conflict.rule.ts
T

19 lines
567 B
TypeScript

import { LintSeverity } from '@prisma/client';
import { LintRule, LintIssue } from './base.rule';
export class RemoteConflictRule implements LintRule {
code = 'REMOTE_CONFLICT';
severity = LintSeverity.ERROR;
check(video: any): LintIssue | null {
if (video.remoteConflict) {
return {
message: 'Remote YouTube metadata has changed since last sync — local and remote are out of sync',
targetField: 'sync',
fixSuggestion: 'Review the remote changes and re-sync to resolve the conflict.',
};
}
return null;
}
}