Test connection string now uses the currently typed in connection string rather than the last saved one

This commit is contained in:
Isaac Abadi
2021-07-26 20:31:35 -07:00
parent fb5c13db27
commit 258d5ff495
5 changed files with 15 additions and 10 deletions

View File

@@ -1600,9 +1600,10 @@ app.post('/api/transferDB', optionalJwt, async (req, res) => {
});
app.post('/api/testConnectionString', optionalJwt, async (req, res) => {
const connection_string = req.body.connection_string;
let success = null;
let error = '';
success = await db_api.connectToDB(0, true);
success = await db_api.connectToDB(0, true, connection_string);
if (!success) error = 'Connection string failed.';
res.send({success: success, error: error});