let song commands through

This commit is contained in:
legop3
2026-01-21 13:47:29 -05:00
parent 55c72e0d9b
commit fe94c38963
2 changed files with 12 additions and 25 deletions
+2 -1
View File
@@ -64,7 +64,8 @@ io.on('connection', (socket) => {
if (!roverId) {
throw new Error('roverId required');
}
if (!roverManager.canDrive(roverId, socket)) {
const isSongCommand = type === 'song';
if (!isSongCommand && !roverManager.canDrive(roverId, socket)) {
throw new Error('Not your turn or no control');
}
const payload = data ? { ...data } : {};