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
|
||||
async socket => {
|
||||
try {
|
||||
logger.info('Received connect request for shockping socket')
|
||||
if (!isAuthenticated()) {
|
||||
logger.info(
|
||||
'not authenticated in gun for shockping socket, will send NOT_AUTH'
|
||||
)
|
||||
socket.emit(Common.Constants.ErrorCode.NOT_AUTH)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
logger.info('now checking token')
|
||||
const { token } = socket.handshake.query
|
||||
|
||||
const isAuth = await isValidToken(token)
|
||||
|
||||
if (!isAuth) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue