Merge pull request #171 from shocknet/better-logs
cleaner logs, correct route log
This commit is contained in:
commit
cc9ace03d5
2 changed files with 2 additions and 6 deletions
|
|
@ -65,7 +65,7 @@ class Auth {
|
||||||
logger.info('validateToken err', err)
|
logger.info('validateToken err', err)
|
||||||
reject(err)
|
reject(err)
|
||||||
} else {
|
} else {
|
||||||
logger.info('decoded', decoded)
|
// logger.info('decoded', decoded)
|
||||||
resolve({ valid: true })
|
resolve({ valid: true })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
|
|
||||||
app.use(async (req, res, next) => {
|
app.use(async (req, res, next) => {
|
||||||
logger.info('Route:', req.path)
|
logger.info(`Route: ${req.path}`)
|
||||||
if (unprotectedRoutes[req.method][req.path]) {
|
if (unprotectedRoutes[req.method][req.path]) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1937,7 +1937,6 @@ module.exports = async (
|
||||||
app.get(`/api/gun/${GunEvent.ON_CHATS}`, (_, res) => {
|
app.get(`/api/gun/${GunEvent.ON_CHATS}`, (_, res) => {
|
||||||
try {
|
try {
|
||||||
const data = Events.getChats()
|
const data = Events.getChats()
|
||||||
logger.info(`Chats polled: ${data.length}`)
|
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|
@ -1961,7 +1960,6 @@ module.exports = async (
|
||||||
.get(Key.AVATAR)
|
.get(Key.AVATAR)
|
||||||
.then()
|
.then()
|
||||||
)
|
)
|
||||||
logger.info(`avatar poll:${(data || '').length} chars`)
|
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|
@ -1985,7 +1983,6 @@ module.exports = async (
|
||||||
.get(Key.DISPLAY_NAME)
|
.get(Key.DISPLAY_NAME)
|
||||||
.then()
|
.then()
|
||||||
)
|
)
|
||||||
logger.info(`display name poll:${data}`)
|
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|
@ -2006,7 +2003,6 @@ module.exports = async (
|
||||||
const data = await timeout5(
|
const data = await timeout5(
|
||||||
user.get(Key.CURRENT_HANDSHAKE_ADDRESS).then()
|
user.get(Key.CURRENT_HANDSHAKE_ADDRESS).then()
|
||||||
)
|
)
|
||||||
logger.info(`handshake address poll:${data}`)
|
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue