mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
let song commands through
This commit is contained in:
@@ -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 } : {};
|
||||
|
||||
Reference in New Issue
Block a user