mirror of
https://github.com/edumeet/edumeet.git
synced 2026-07-26 04:14:21 +00:00
Tidy lint
This commit is contained in:
parent
f72ee06315
commit
a71e21fffc
2 changed files with 14 additions and 7 deletions
|
|
@ -266,7 +266,8 @@ module.exports =
|
|||
peer.picture = userinfo.picture;
|
||||
}
|
||||
}
|
||||
if(userinfo['urn:oid:0.9.2342.19200300.100.1.60'] != null ){
|
||||
if (userinfo['urn:oid:0.9.2342.19200300.100.1.60'] != null)
|
||||
{
|
||||
peer.picture = `data:image/jpeg;base64, ${userinfo['urn:oid:0.9.2342.19200300.100.1.60']}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,8 +88,9 @@ const app = express();
|
|||
|
||||
app.use(helmet.hsts());
|
||||
const sharedCookieParser=cookieParser();
|
||||
|
||||
app.use(sharedCookieParser);
|
||||
app.use(bodyParser.json( { limit: '5mb' }));
|
||||
app.use(bodyParser.json({ limit: '5mb' }));
|
||||
app.use(bodyParser.urlencoded({ limit: '5mb', extended: true }));
|
||||
|
||||
const session = expressSession({
|
||||
|
|
@ -418,7 +419,9 @@ async function setupAuth()
|
|||
peerId : req.query.peerId,
|
||||
roomId : req.query.roomId
|
||||
}));
|
||||
if (authStrategy== 'saml') {
|
||||
|
||||
if (authStrategy== 'saml')
|
||||
{
|
||||
req.session.samlstate=state;
|
||||
}
|
||||
|
||||
|
|
@ -505,14 +508,15 @@ async function setupAuth()
|
|||
try
|
||||
{
|
||||
let state;
|
||||
|
||||
if (authStrategy == 'saml')
|
||||
state=req.session.samlstate;
|
||||
else
|
||||
{
|
||||
if (req.method === 'GET')
|
||||
state = JSON.parse(base64.decode(req.query.state));
|
||||
if (req.method === 'POST')
|
||||
state = JSON.parse(base64.decode(req.body.state));
|
||||
state = JSON.parse(base64.decode(req.query.state));
|
||||
if (req.method === 'POST')
|
||||
state = JSON.parse(base64.decode(req.body.state));
|
||||
}
|
||||
const { peerId, roomId } = state;
|
||||
|
||||
|
|
@ -654,7 +658,9 @@ async function runWebSocketServer()
|
|||
{
|
||||
io = require('socket.io')(mainListener);
|
||||
|
||||
io.use(sharedSession(session, sharedCookieParser, { autoSave : true },{cookie: false}));
|
||||
io.use(
|
||||
sharedSession(session, sharedCookieParser, { autoSave: true }, { cookie: false })
|
||||
);
|
||||
|
||||
// Handle connections from clients.
|
||||
io.on('connection', (socket) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue