[call-me] - #3 fix typo
This commit is contained in:
+9
-6
@@ -142,15 +142,18 @@ app.get('/randomImage', async (req, res) => {
|
||||
app.get('/join/', (req, res) => {
|
||||
if (Object.keys(req.query).length > 0) {
|
||||
console.log('Request query', req.query);
|
||||
|
||||
const { user, call, password } = req.query;
|
||||
// http://localhost:8000/join?user=user1
|
||||
// http://localhost:8000/join?user=user2&call=user1
|
||||
const { user, call, password } = req.query;
|
||||
// http://localhost:8000/join?user=user1&password=123456789
|
||||
// http://localhost:8000/join?user=user2&call=user1&password=123456789
|
||||
|
||||
if (config.roomPasswordEnabled && password !== config.roomPassword) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
if (user || (user && call)) {
|
||||
if (config.roomPasswordEnabled && password !== config.roomPassword) {
|
||||
// http://localhost:8000/join?user=user1&password=123456789
|
||||
// http://localhost:8000/join?user=user2&call=user1&password=123456789
|
||||
return unauthorized(res);
|
||||
}
|
||||
return res.sendFile(HOME);
|
||||
}
|
||||
return notFound(res);
|
||||
|
||||
Reference in New Issue
Block a user