Merge branch 'master' into feature/no-encryption-debugging
This commit is contained in:
commit
023298c887
2 changed files with 3 additions and 2 deletions
|
|
@ -249,7 +249,7 @@ module.exports = async (
|
||||||
return res.status(401).json(error);
|
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();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1618,6 +1618,7 @@ module.exports = async (
|
||||||
const GunEvent = Common.Constants.Event
|
const GunEvent = Common.Constants.Event
|
||||||
const Key = require('../services/gunDB/contact-api/key')
|
const Key = require('../services/gunDB/contact-api/key')
|
||||||
const { timeout5 } = require('../services/gunDB/contact-api/utils')
|
const { timeout5 } = require('../services/gunDB/contact-api/utils')
|
||||||
|
|
||||||
app.get("/api/gun/lndchanbackups", async (req,res) => {
|
app.get("/api/gun/lndchanbackups", async (req,res) => {
|
||||||
try{
|
try{
|
||||||
const user = require('../services/gunDB/Mediator').getUser()
|
const user = require('../services/gunDB/Mediator').getUser()
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ const server = program => {
|
||||||
const authorized = Encryption.isAuthorizedDevice({ deviceId })
|
const authorized = Encryption.isAuthorizedDevice({ deviceId })
|
||||||
const encryptedMessage = authorized
|
const encryptedMessage = authorized
|
||||||
? Encryption.encryptMessage({
|
? Encryption.encryptMessage({
|
||||||
message: args[0],
|
message: args[0] ? args[0] : {},
|
||||||
deviceId,
|
deviceId,
|
||||||
metadata: {
|
metadata: {
|
||||||
hash: dataHash
|
hash: dataHash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue