refs #4823 Bug fixes

This commit is contained in:
Guillermo Bonet 2023-06-19 12:01:31 +02:00
parent 9fb16cf344
commit fe0489bccd
1 changed files with 7 additions and 2 deletions

View File

@ -765,7 +765,7 @@ export async function vnRequest(method, url, data, headers) {
await checkToken(true);
headers.Authorization
? headers.Authorization = `Bearer ${await getCurrentToken()}`
: handler('critical', err);;
: handler('critical', err);
break;
default:
await warnSpin(null, err, false);
@ -809,10 +809,15 @@ export async function startSpin(msg, isKeep) {
* @param {String} msg Text of spinner
**/
export async function txtSpin(msg) {
if (!spinner) {
startSpin(msg);
return;
}
if (JSON.parse(env.TIME_STAMPS) && msg)
msg = `${chalk.gray(`[${new moment().format('YYYY-MM-DD hh:mm:ss A')}]`)} ${msg}`;
spinner.text = msg
spinner.text = msg;
};
/**