FC-softwares/baseball-scoreboard

View on GitHub
socket.js

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if (res_data.ok === true) {
socket.emit('auth', { ok: true, message: 'authorized' });
authorizedSessions.push(socket.id);
console.log('Authorized session', socket.id, authorizedSessions);
} else {
Severity: Major
Found in socket.js and 1 other location - About 1 hr to fix
socket.js on lines 133..153

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if(socket.handshake.auth.id == 'guest' && socket.handshake.auth.token == 'guest' && CLIENT == 'DEMO'){
socket.emit('auth', { ok: true, message: 'authorized' });
authorizedSessions.push(socket.id);
console.log('Authorized session', socket.id, authorizedSessions);
}else{
Severity: Major
Found in socket.js and 1 other location - About 1 hr to fix
socket.js on lines 142..148

There are no issues that match your filters.

Category
Status