logging
This commit is contained in:
parent
1578cf8c58
commit
669bda34c5
1 changed files with 5 additions and 1 deletions
|
|
@ -447,14 +447,18 @@ module.exports = (
|
||||||
// TODO: make this sync
|
// TODO: make this sync
|
||||||
async socket => {
|
async socket => {
|
||||||
try {
|
try {
|
||||||
|
logger.info('Received connect request for shockping socket')
|
||||||
if (!isAuthenticated()) {
|
if (!isAuthenticated()) {
|
||||||
|
logger.info(
|
||||||
|
'not authenticated in gun for shockping socket, will send NOT_AUTH'
|
||||||
|
)
|
||||||
socket.emit(Common.Constants.ErrorCode.NOT_AUTH)
|
socket.emit(Common.Constants.ErrorCode.NOT_AUTH)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info('now checking token')
|
||||||
const { token } = socket.handshake.query
|
const { token } = socket.handshake.query
|
||||||
|
|
||||||
const isAuth = await isValidToken(token)
|
const isAuth = await isValidToken(token)
|
||||||
|
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue