diff --git a/backend/controllers/eclair/webSocketClient.js b/backend/controllers/eclair/webSocketClient.js index 9f3b31c2..2f88b2fb 100644 --- a/backend/controllers/eclair/webSocketClient.js +++ b/backend/controllers/eclair/webSocketClient.js @@ -1,4 +1,4 @@ -import * as WebSocket from 'ws'; +import WebSocket from 'ws'; import { Logger } from '../../utils/logger.js'; import { Common } from '../../utils/common.js'; import { WSServer } from '../../utils/webSocketServer.js'; diff --git a/backend/controllers/shared/authenticate.js b/backend/controllers/shared/authenticate.js index 4325ede8..ff5e71ad 100644 --- a/backend/controllers/shared/authenticate.js +++ b/backend/controllers/shared/authenticate.js @@ -76,12 +76,12 @@ export const authenticateUser = (req, res, next) => { const password = req.body.authenticationValue; if (common.rtl_pass === password && failed.count < ALLOWED_LOGIN_ATTEMPTS) { if (req.body.twoFAToken && req.body.twoFAToken !== '') { - // if (!verifyToken(req.body.twoFAToken)) { - // logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); - // failed.count = failed.count + 1; - // failed.lastTried = currentTime; - // return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); - // } + if (!verifyToken(req.body.twoFAToken)) { + logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); + failed.count = failed.count + 1; + failed.lastTried = currentTime; + return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); + } } if (!req.session.selectedNode) { req.session.selectedNode = common.initSelectedNode; diff --git a/backend/controllers/shared/pageSettings.js b/backend/controllers/shared/pageSettings.js index 6040a8ab..9ded7b70 100644 --- a/backend/controllers/shared/pageSettings.js +++ b/backend/controllers/shared/pageSettings.js @@ -9,7 +9,7 @@ export const getPageSettings = (req, res, next) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Getting Page Settings..' }); databaseService.find(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS).then((settings) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Page Settings Received', data: settings }); - return res.status(200).json(settings); + res.status(200).json(settings); }).catch((errRes) => { const err = common.handleError(errRes, 'Page Settings', 'Page Settings Error', req.session.selectedNode); return res.status(err.statusCode).json({ message: err.message, error: err.error }); diff --git a/backend/routes/cln/balance.js b/backend/routes/cln/balance.js index 719afb47..67cb7945 100644 --- a/backend/routes/cln/balance.js +++ b/backend/routes/cln/balance.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBalance } from '../../controllers/cln/balance.js'; diff --git a/backend/routes/cln/channels.js b/backend/routes/cln/channels.js index d4550d77..8d02c384 100644 --- a/backend/routes/cln/channels.js +++ b/backend/routes/cln/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listChannels, openChannel, setChannelFee, closeChannel, getLocalRemoteBalance, listForwards, funderUpdatePolicy, listForwardsPaginated } from '../../controllers/cln/channels.js'; diff --git a/backend/routes/cln/fees.js b/backend/routes/cln/fees.js index a1cd8eee..8dbf71d3 100644 --- a/backend/routes/cln/fees.js +++ b/backend/routes/cln/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/cln/fees.js'; diff --git a/backend/routes/cln/getInfo.js b/backend/routes/cln/getInfo.js index 4a9aedea..060cc96d 100644 --- a/backend/routes/cln/getInfo.js +++ b/backend/routes/cln/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/cln/getInfo.js'; diff --git a/backend/routes/cln/index.js b/backend/routes/cln/index.js index 39865034..e679145f 100644 --- a/backend/routes/cln/index.js +++ b/backend/routes/cln/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoCLRoutes from './getInfo.js'; import feesCLRoutes from './fees.js'; diff --git a/backend/routes/cln/invoices.js b/backend/routes/cln/invoices.js index 3141b4ec..04998214 100644 --- a/backend/routes/cln/invoices.js +++ b/backend/routes/cln/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, addInvoice, deleteExpiredInvoice } from '../../controllers/cln/invoices.js'; diff --git a/backend/routes/cln/network.js b/backend/routes/cln/network.js index 7fa20690..e4fb2f22 100644 --- a/backend/routes/cln/network.js +++ b/backend/routes/cln/network.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRoute, listNode, listChannel, feeRates, listNodes } from '../../controllers/cln/network.js'; diff --git a/backend/routes/cln/offers.js b/backend/routes/cln/offers.js index fe123949..bcc2738d 100644 --- a/backend/routes/cln/offers.js +++ b/backend/routes/cln/offers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listOfferBookmarks, deleteOfferBookmark, listOffers, disableOffer, createOffer, fetchOfferInvoice } from '../../controllers/cln/offers.js'; diff --git a/backend/routes/cln/onchain.js b/backend/routes/cln/onchain.js index f95be2c7..816590ee 100644 --- a/backend/routes/cln/onchain.js +++ b/backend/routes/cln/onchain.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, onChainWithdraw, getUTXOs } from '../../controllers/cln/onchain.js'; diff --git a/backend/routes/cln/payments.js b/backend/routes/cln/payments.js index 6f9c2f42..2f4c6cab 100644 --- a/backend/routes/cln/payments.js +++ b/backend/routes/cln/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listPayments, postPayment } from '../../controllers/cln/payments.js'; diff --git a/backend/routes/cln/peers.js b/backend/routes/cln/peers.js index 4ccaeb07..65b4315d 100644 --- a/backend/routes/cln/peers.js +++ b/backend/routes/cln/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/cln/peers.js'; diff --git a/backend/routes/cln/utility.js b/backend/routes/cln/utility.js index 1114df54..a8ef800d 100644 --- a/backend/routes/cln/utility.js +++ b/backend/routes/cln/utility.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayments, decodePayment, signMessage, verifyMessage, listConfigs } from '../../controllers/cln/utility.js'; diff --git a/backend/routes/eclair/channels.js b/backend/routes/eclair/channels.js index f51d8388..1148b457 100644 --- a/backend/routes/eclair/channels.js +++ b/backend/routes/eclair/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getChannels, getChannelStats, openChannel, updateChannelRelayFee, closeChannel } from '../../controllers/eclair/channels.js'; diff --git a/backend/routes/eclair/fees.js b/backend/routes/eclair/fees.js index 48e3ab08..f28e1c8f 100644 --- a/backend/routes/eclair/fees.js +++ b/backend/routes/eclair/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees, getPayments } from '../../controllers/eclair/fees.js'; diff --git a/backend/routes/eclair/getInfo.js b/backend/routes/eclair/getInfo.js index d542f3e1..4bfa4b68 100644 --- a/backend/routes/eclair/getInfo.js +++ b/backend/routes/eclair/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/eclair/getInfo.js'; diff --git a/backend/routes/eclair/index.js b/backend/routes/eclair/index.js index 7fcb4cd0..104ec9e9 100644 --- a/backend/routes/eclair/index.js +++ b/backend/routes/eclair/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoECLRoutes from './getInfo.js'; import feesECLRoutes from './fees.js'; diff --git a/backend/routes/eclair/invoices.js b/backend/routes/eclair/invoices.js index 1770e6a4..06dddd4c 100644 --- a/backend/routes/eclair/invoices.js +++ b/backend/routes/eclair/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, getInvoice, createInvoice } from '../../controllers/eclair/invoices.js'; diff --git a/backend/routes/eclair/network.js b/backend/routes/eclair/network.js index ee6a8dd6..71179aac 100644 --- a/backend/routes/eclair/network.js +++ b/backend/routes/eclair/network.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNodes } from '../../controllers/eclair/network.js'; diff --git a/backend/routes/eclair/onchain.js b/backend/routes/eclair/onchain.js index 4370cd59..b25ecc7f 100644 --- a/backend/routes/eclair/onchain.js +++ b/backend/routes/eclair/onchain.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, getBalance, getTransactions, sendFunds } from '../../controllers/eclair/onchain.js'; diff --git a/backend/routes/eclair/payments.js b/backend/routes/eclair/payments.js index c25db27e..b60fda24 100644 --- a/backend/routes/eclair/payments.js +++ b/backend/routes/eclair/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { queryPaymentRoute, decodePayment, getSentPaymentsInformation, postPayment } from '../../controllers/eclair/payments.js'; diff --git a/backend/routes/eclair/peers.js b/backend/routes/eclair/peers.js index 7bbcde5e..3fe03191 100644 --- a/backend/routes/eclair/peers.js +++ b/backend/routes/eclair/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, connectPeer, deletePeer } from '../../controllers/eclair/peers.js'; diff --git a/backend/routes/lnd/balance.js b/backend/routes/lnd/balance.js index 6b8e0eb7..929faae2 100644 --- a/backend/routes/lnd/balance.js +++ b/backend/routes/lnd/balance.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBlockchainBalance } from '../../controllers/lnd/balance.js'; diff --git a/backend/routes/lnd/channels.js b/backend/routes/lnd/channels.js index 25bf6461..6bc1aa7f 100644 --- a/backend/routes/lnd/channels.js +++ b/backend/routes/lnd/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getAllChannels, getPendingChannels, getClosedChannels, postChannel, postTransactions, closeChannel, postChanPolicy } from '../../controllers/lnd/channels.js'; diff --git a/backend/routes/lnd/channelsBackup.js b/backend/routes/lnd/channelsBackup.js index 814b4c91..c5884bea 100644 --- a/backend/routes/lnd/channelsBackup.js +++ b/backend/routes/lnd/channelsBackup.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBackup, getRestoreList, postBackupVerify, postRestore } from '../../controllers/lnd/channelsBackup.js'; diff --git a/backend/routes/lnd/fees.js b/backend/routes/lnd/fees.js index bb90bfa3..9bb766b3 100644 --- a/backend/routes/lnd/fees.js +++ b/backend/routes/lnd/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/lnd/fees.js'; diff --git a/backend/routes/lnd/getInfo.js b/backend/routes/lnd/getInfo.js index 1c4e45fe..7edf39a7 100644 --- a/backend/routes/lnd/getInfo.js +++ b/backend/routes/lnd/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/lnd/getInfo.js'; diff --git a/backend/routes/lnd/graph.js b/backend/routes/lnd/graph.js index 8e452f9a..4efa047f 100644 --- a/backend/routes/lnd/graph.js +++ b/backend/routes/lnd/graph.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getDescribeGraph, getGraphInfo, getAliasesForPubkeys, getGraphNode, getGraphEdge, getRemoteFeePolicy, getQueryRoutes } from '../../controllers/lnd/graph.js'; diff --git a/backend/routes/lnd/index.js b/backend/routes/lnd/index.js index 9c517183..bd17733c 100644 --- a/backend/routes/lnd/index.js +++ b/backend/routes/lnd/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoRoutes from './getInfo.js'; import channelsRoutes from './channels.js'; diff --git a/backend/routes/lnd/invoices.js b/backend/routes/lnd/invoices.js index eaec4746..fc7a3342 100644 --- a/backend/routes/lnd/invoices.js +++ b/backend/routes/lnd/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, invoiceLookup, addInvoice } from '../../controllers/lnd/invoices.js'; diff --git a/backend/routes/lnd/message.js b/backend/routes/lnd/message.js index 4bf132d5..00e2addf 100644 --- a/backend/routes/lnd/message.js +++ b/backend/routes/lnd/message.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { signMessage, verifyMessage } from '../../controllers/lnd/message.js'; diff --git a/backend/routes/lnd/newAddress.js b/backend/routes/lnd/newAddress.js index 0f74e083..fe2b9ecb 100644 --- a/backend/routes/lnd/newAddress.js +++ b/backend/routes/lnd/newAddress.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress } from '../../controllers/lnd/newAddress.js'; diff --git a/backend/routes/lnd/payments.js b/backend/routes/lnd/payments.js index 368e2ae7..9a496d38 100644 --- a/backend/routes/lnd/payments.js +++ b/backend/routes/lnd/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayment, decodePayments, getPayments, getAllLightningTransactions, paymentLookup } from '../../controllers/lnd/payments.js'; diff --git a/backend/routes/lnd/peers.js b/backend/routes/lnd/peers.js index 9dfb2b38..dcf26dd3 100644 --- a/backend/routes/lnd/peers.js +++ b/backend/routes/lnd/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/lnd/peers.js'; diff --git a/backend/routes/lnd/switch.js b/backend/routes/lnd/switch.js index c4c60385..c0a85155 100644 --- a/backend/routes/lnd/switch.js +++ b/backend/routes/lnd/switch.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { forwardingHistory } from '../../controllers/lnd/switch.js'; diff --git a/backend/routes/lnd/transactions.js b/backend/routes/lnd/transactions.js index 98c63687..f8191ad2 100644 --- a/backend/routes/lnd/transactions.js +++ b/backend/routes/lnd/transactions.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getTransactions, postTransactions } from '../../controllers/lnd/transactions.js'; diff --git a/backend/routes/lnd/wallet.js b/backend/routes/lnd/wallet.js index f4b09aa4..4f2fbc9d 100644 --- a/backend/routes/lnd/wallet.js +++ b/backend/routes/lnd/wallet.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { genSeed, updateSelNodeOptions, getUTXOs, operateWallet, bumpFee, labelTransaction, leaseUTXO, releaseUTXO } from '../../controllers/lnd/wallet.js'; diff --git a/backend/routes/shared/RTLConf.js b/backend/routes/shared/RTLConf.js index 13c1860e..d783092d 100644 --- a/backend/routes/shared/RTLConf.js +++ b/backend/routes/shared/RTLConf.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRTLConfigInitial, getRTLConfig, updateUISettings, update2FASettings, getConfig, getFile, updateSelectedNode, updateDefaultNode, updateServiceSettings, updateSSO, getCurrencyRates } from '../../controllers/shared/RTLConf.js'; diff --git a/backend/routes/shared/authenticate.js b/backend/routes/shared/authenticate.js index 34cb73f2..0cbdbbe4 100644 --- a/backend/routes/shared/authenticate.js +++ b/backend/routes/shared/authenticate.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { authenticateUser, verifyToken, resetPassword, logoutUser } from '../../controllers/shared/authenticate.js'; const router = Router(); diff --git a/backend/routes/shared/boltz.js b/backend/routes/shared/boltz.js index 3961d675..f669753b 100644 --- a/backend/routes/shared/boltz.js +++ b/backend/routes/shared/boltz.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo, getServiceInfo, listSwaps, getSwapInfo, createSwap, createReverseSwap, createChannel, deposit } from '../../controllers/shared/boltz.js'; diff --git a/backend/routes/shared/index.js b/backend/routes/shared/index.js index 1d8f0138..2fd7e10e 100644 --- a/backend/routes/shared/index.js +++ b/backend/routes/shared/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import authenticateRoutes from './authenticate.js'; import boltzRoutes from './boltz.js'; diff --git a/backend/routes/shared/loop.js b/backend/routes/shared/loop.js index ddc3ddd3..38436ef5 100644 --- a/backend/routes/shared/loop.js +++ b/backend/routes/shared/loop.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js'; diff --git a/backend/routes/shared/pageSettings.js b/backend/routes/shared/pageSettings.js index 61c47a8c..6f3920c6 100644 --- a/backend/routes/shared/pageSettings.js +++ b/backend/routes/shared/pageSettings.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPageSettings, savePageSettings } from '../../controllers/shared/pageSettings.js'; diff --git a/backend/utils/database.js b/backend/utils/database.js index be1ddd00..2a94a40b 100644 --- a/backend/utils/database.js +++ b/backend/utils/database.js @@ -224,7 +224,7 @@ export class DatabaseAdapter { } } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } const collectionFilePath = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json'; try { @@ -233,7 +233,7 @@ export class DatabaseAdapter { } } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } try { const otherFiles = fs.readdirSync(this.dbFilePath); @@ -264,7 +264,7 @@ export class DatabaseAdapter { return dataObj; } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } } getSelNode() { diff --git a/frontend/index.html b/frontend/index.html index e4125854..f4a222f0 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,6 +13,6 @@