cloudron 5.3.4 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/actions.js +3 -2
package/package.json
CHANGED
package/src/actions.js
CHANGED
|
@@ -84,6 +84,7 @@ function createRequest(method, apiPath, options) {
|
|
|
84
84
|
url += `access_token=${token}`;
|
|
85
85
|
const request = superagent(method, url);
|
|
86
86
|
if (!rejectUnauthorized) request.disableTLSCerts();
|
|
87
|
+
request.retry(3);
|
|
87
88
|
request.ok(() => true);
|
|
88
89
|
return request;
|
|
89
90
|
}
|
|
@@ -343,7 +344,7 @@ async function authenticate(adminFqdn, username, password, options) {
|
|
|
343
344
|
const { rejectUnauthorized, askForTotpToken } = options;
|
|
344
345
|
if (askForTotpToken) totpToken = readlineSync.question('2FA Token: ', {});
|
|
345
346
|
|
|
346
|
-
const request = superagent.post(`https://${adminFqdn}/api/v1/
|
|
347
|
+
const request = superagent.post(`https://${adminFqdn}/api/v1/auth/login`)
|
|
347
348
|
.timeout(60000)
|
|
348
349
|
.send({ username, password, totpToken })
|
|
349
350
|
.ok(() => true)
|
|
@@ -948,7 +949,7 @@ async function logs(localOptions, cmd) {
|
|
|
948
949
|
|
|
949
950
|
if (typeof options.system === 'boolean' && options.system) {
|
|
950
951
|
// box
|
|
951
|
-
apiPath = `https://${adminFqdn}/api/v1/
|
|
952
|
+
apiPath = `https://${adminFqdn}/api/v1/system/${ tail ? 'logstream' : 'logs' }/box`;
|
|
952
953
|
} else if (typeof options.system === 'string') {
|
|
953
954
|
// services
|
|
954
955
|
apiPath = `https://${adminFqdn}/api/v1/services/${options.system}/${ tail ? 'logstream' : 'logs' }`;
|