add diagnostic route to aid debugging login issues (#26)
* add diagnostic route to aid debugging login issues * don't require the user to be the wiki owner
This commit is contained in:
@ -629,6 +629,15 @@ module.exports = exports = (log, loga, argv) ->
|
|||||||
ownerName: id.name
|
ownerName: id.name
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.get '/auth/diag', (req, res) ->
|
||||||
|
# some diagnostic feedback to the user, for when something strange happens
|
||||||
|
user = 'User is unknown'
|
||||||
|
try
|
||||||
|
user = req.session.passport.user
|
||||||
|
date = new Date().toString()
|
||||||
|
wikiName = new URL(argv.url).hostname
|
||||||
|
console.log 'SOCIAL *** ', date, ' *** ', wikiName, ' *** ', JSON.stringify(user)
|
||||||
|
res.json date
|
||||||
|
|
||||||
app.get '/logout', (req, res) ->
|
app.get '/logout', (req, res) ->
|
||||||
console.log 'Logout...'
|
console.log 'Logout...'
|
||||||
|
Reference in New Issue
Block a user