diff --git a/backend/controllers/cln/invoices.js b/backend/controllers/cln/invoices.js index 2f26a949..0ff81ff7 100644 --- a/backend/controllers/cln/invoices.js +++ b/backend/controllers/cln/invoices.js @@ -10,11 +10,11 @@ export const deleteExpiredInvoice = (req, res, next) => { if (options.error) { return res.status(options.statusCode).json({ message: options.message, error: options.error }); } - options.url = req.session.selectedNode.settings.lnServerUrl + '/v1/delexpiredinvoice'; + options.url = req.session.selectedNode.settings.lnServerUrl + '/v1/autoclean-once'; options.body = req.body; request.post(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Invoice', msg: 'Invoices Deleted', data: body }); - res.status(204).json({ status: 'Invoice Deleted Successfully' }); + res.status(201).json({ status: 'Cleaned Invoices: ' + body.autoclean.expiredinvoices.cleaned + ', Uncleaned Invoices: ' + body.autoclean.expiredinvoices.uncleaned }); }).catch((errRes) => { const err = common.handleError(errRes, 'Invoice', 'Delete Invoice Error', req.session.selectedNode); return res.status(err.statusCode).json({ message: err.message, error: err.error }); diff --git a/frontend/index.html b/frontend/index.html index 39ca2d0e..717e71b9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -15,5 +15,5 @@