Merge pull request #124 from shocknet/gun-status-http-2
gun auth status http endpoint
This commit is contained in:
commit
fc043a6ba6
2 changed files with 12 additions and 2 deletions
|
|
@ -2382,6 +2382,14 @@ module.exports = async (
|
|||
})
|
||||
}
|
||||
})
|
||||
|
||||
ap.get(`/api/gun/auth`, (_, res) => {
|
||||
const { isAuthenticated } = require('../services/gunDB/Mediator')
|
||||
|
||||
return res.status(200).json({
|
||||
data: isAuthenticated()
|
||||
})
|
||||
})
|
||||
/**
|
||||
* Return app so that it can be used by express.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ module.exports = {
|
|||
"/favicon.ico": true,
|
||||
"/api/lnd/connect": true,
|
||||
"/api/lnd/wallet/status": true,
|
||||
"/api/lnd/auth": true
|
||||
"/api/lnd/auth": true,
|
||||
//
|
||||
"/api/gun/auth": true
|
||||
},
|
||||
POST: {
|
||||
"/api/lnd/connect": true,
|
||||
|
|
@ -28,5 +30,5 @@ module.exports = {
|
|||
PUT: {},
|
||||
DELETE: {}
|
||||
},
|
||||
nonEncryptedRoutes: ['/api/security/exchangeKeys', '/healthz', '/ping', '/api/lnd/wallet/status']
|
||||
nonEncryptedRoutes: ['/api/security/exchangeKeys', '/healthz', '/ping', '/api/lnd/wallet/status', '/api/gun/auth']
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue