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 SEA = require('../services/gunDB/Mediator').mySEA
|
||||
|
||||
await Common.Utils.makePromise((res, rej) => {
|
||||
lightning.exportAllChannelBackups({}, (err, channelBackups) => {
|
||||
if (err) {
|
||||
return handleError(res, err)
|
||||
return rej(new Error(err.details))
|
||||
}
|
||||
|
||||
res(
|
||||
GunActions.saveChannelsBackup(
|
||||
JSON.stringify(channelBackups),
|
||||
user,
|
||||
SEA
|
||||
)
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
// Send an event to update lightning's status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue