🐛 Fix S3 server management
Tim Izzo tim@octree.ch
Fri, 30 Jul 2021 16:29:26 +0200
3 files changed,
3 insertions(+),
3 deletions(-)
M
cmds/s3/add.js
→
cmds/s3/add.js
@@ -21,8 +21,9 @@ default: 443,
}, useSSL: { alias: "s", + type: "boolean", describe: "Use SSL for server connection", - default: true, + default: false, }, bucket: { alias: "b",
M
handlers/s3/add.js
→
handlers/s3/add.js
@@ -2,7 +2,6 @@ const store = require("../../libs/config/store");
const addS3 = params => { const { s3Name, host, accessKey, secretKey, useSSL, port, bucket } = params; - console.log(params); store("s3", s3Name, { host, accessKey, secretKey, useSSL, port, bucket }); console.log(`S3 server ${s3Name} saved in config`); };
M
libs/s3/getConfig.js
→
libs/s3/getConfig.js
@@ -10,7 +10,7 @@ const serversCount = serverNames.length;
if (serversCount === 1) return { ...s3Servers[serverNames[0]], name: serverNames[0] }; - throw new Error(`No S3 server corresponding to '${s3Servers}' in config.`); + throw new Error(`No S3 server corresponding to '${s3Name}' in config.`); }; module.exports = getS3Config;