Skip to content

Commit

Permalink
fixed return of machine creation to have user/pass
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagostutz committed Mar 20, 2020
1 parent 73a1832 commit 1f37d8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function generateMachineConnectionParams(req, res) {
}

let registeredMachine = { machineId }
const tunnelPort = Math.floor(Math.random() * 40000) + 3000
const tunnelPort = (Math.floor(Math.random() * 40000) + 3000) + ""

registeredMachine.account = account
registeredMachine.sshHost = sshHost
Expand All @@ -250,7 +250,7 @@ function generateMachineConnectionParams(req, res) {

if (account) {
res.setHeader("Location", "http://" + baseDomain + "/account/" + account.accountId + "/machine/" + machineId);
res.json({ machineId: machineId, sshHost: sshHost, sshPort: sshPort, tunnelPort: tunnelPort + "" });
res.json({ machineId: machineId, sshHost: sshHost, sshPort: sshPort, sshUsername: registeredMachine.sshUsername, sshPassword: registeredMachine.sshPassword, tunnelPort: registeredMachine.tunnelPort });
} else {
res.status(404).send({ message: 'No account found with ID: ' + req.params.accountId });
}
Expand Down

0 comments on commit 1f37d8d

Please sign in to comment.