Merge pull request #71 from shocknet/bug/no-data-error
Bug/no-data-error
This commit is contained in:
commit
492cd39b61
2 changed files with 4 additions and 4 deletions
|
|
@ -249,7 +249,7 @@ module.exports = async (
|
|||
return res.status(401).json(error);
|
||||
}
|
||||
|
||||
if (req.method === "GET") {
|
||||
if (req.method === "GET" || req.method === "DELETE" || !req.body.encryptionKey && !req.body.iv) {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
|
@ -1617,6 +1617,8 @@ module.exports = async (
|
|||
|
||||
const GunEvent = Common.Constants.Event
|
||||
const Key = require('../services/gunDB/contact-api/key')
|
||||
const { timeout5 } = require('../services/gunDB/contact-api/utils')
|
||||
|
||||
app.get("/api/gun/lndchanbackups", async (req,res) => {
|
||||
try{
|
||||
const user = require('../services/gunDB/Mediator').getUser()
|
||||
|
|
@ -1634,8 +1636,6 @@ module.exports = async (
|
|||
|
||||
const Events = require('../services/gunDB/contact-api/events')
|
||||
|
||||
const {timeout5} = require('../services/gunDB/contact-api/utils')
|
||||
|
||||
app.get(`/api/gun/${GunEvent.ON_RECEIVED_REQUESTS}`, (_, res) => {
|
||||
try {
|
||||
// spinup
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ const server = program => {
|
|||
const authorized = Encryption.isAuthorizedDevice({ deviceId })
|
||||
const encryptedMessage = authorized
|
||||
? Encryption.encryptMessage({
|
||||
message: args[0],
|
||||
message: args[0] ? args[0] : {},
|
||||
deviceId,
|
||||
metadata: {
|
||||
hash: dataHash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue