avoid duplicate heeaders sent by handleError()
This commit is contained in:
parent
0bd5fd0be5
commit
a047dcf4e5
1 changed files with 14 additions and 9 deletions
|
|
@ -655,15 +655,20 @@ module.exports = async (
|
||||||
const user = require('../services/gunDB/Mediator').getUser()
|
const user = require('../services/gunDB/Mediator').getUser()
|
||||||
const SEA = require('../services/gunDB/Mediator').mySEA
|
const SEA = require('../services/gunDB/Mediator').mySEA
|
||||||
|
|
||||||
lightning.exportAllChannelBackups({}, (err, channelBackups) => {
|
await Common.Utils.makePromise((res, rej) => {
|
||||||
if (err) {
|
lightning.exportAllChannelBackups({}, (err, channelBackups) => {
|
||||||
return handleError(res, err)
|
if (err) {
|
||||||
}
|
return rej(new Error(err.details))
|
||||||
GunActions.saveChannelsBackup(
|
}
|
||||||
JSON.stringify(channelBackups),
|
|
||||||
user,
|
res(
|
||||||
SEA
|
GunActions.saveChannelsBackup(
|
||||||
)
|
JSON.stringify(channelBackups),
|
||||||
|
user,
|
||||||
|
SEA
|
||||||
|
)
|
||||||
|
)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Send an event to update lightning's status
|
// Send an event to update lightning's status
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue