MAJOR: Updates for Authenticated Web UI and CLI #30

开启中
coolaj86 请求将 77 次代码提交从 next 合并至 master
仅显示提交 20ed109aeb 的更改 - 显示所有提交

查看文件

@ -289,12 +289,16 @@ controllers.ssh = function (req, res, opts) {
function sshSuccess() { function sshSuccess() {
//state.config.sshAuto = state.sshAuto; //state.config.sshAuto = state.sshAuto;
saveConfig(function (err) { saveConfig(function (err) {
var local = state.config.sshAuto;
if (false !== local && !local) {
local = 22;
}
res.setHeader('Content-Type', 'application/json'); res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify({ res.end(JSON.stringify({
success: true success: true
, active: true , active: true
, remote: Object.keys(state.config.ports)[0] , remote: Object.keys(state.config.ports)[0]
, local: state.config.sshAuto || 22 , local: local
, saved: !err , saved: !err
, module: 'ssh' , module: 'ssh'
})); }));