You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
555 B

const express = require('express');
const router = express.Router();
const auth = require('middlewares/auth.js');
const applicationLogic = require('logic/application.js');
const safeHandler = require('utils/safeHandler');
router.post('/backup', auth.jwt, safeHandler((req, res) =>
applicationLogic.lndBackup()
.then(response => res.json(response))
));
router.get('/channel-backup', safeHandler((req, res) =>
applicationLogic.lndChannnelBackup()
.then(backupFile => res.download(backupFile, 'channel.backup'))
));
module.exports = router;