Update hosts.js

This commit is contained in:
William Mantly 2019-12-09 21:36:18 -05:00 committed by GitHub
parent 03d6973171
commit bd02f82178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,8 @@ async function add(data){
await client.SADD('hosts', data.host); await client.SADD('hosts', data.host);
await client.HSET('host_' + data.host, 'ip', data.ip); await client.HSET('host_' + data.host, 'ip', data.ip);
await client.HSET('host_' + data.host, 'updated', (new Date).getTime()); await client.HSET('host_' + data.host, 'updated', (new Date).getTime());
await client.HSET('host_' + data.host, 'username', data.username); await client.HSET('host_' + data.host, 'username', data.username);
await client.HSET('host_' + data.host, 'force_ssl', data.forceSSL || 'false');
} catch (error){ } catch (error){
return new Error(error); return new Error(error);