🔒 Enables sensetive data to be passed by env var

This commit is contained in:
Alicia Sykes
2024-04-14 20:50:03 +01:00
parent 75f65de8f6
commit 25e774ca79
26 changed files with 54 additions and 51 deletions

View File

@@ -45,15 +45,15 @@ export default {
computed: {
hostname() {
if (!this.options.hostname) this.error('A hostname is required');
return this.options.hostname;
return this.parseAsEnvVar(this.options.hostname);
},
username() {
if (!this.options.username) this.error('A username is required');
return this.options.username;
return this.parseAsEnvVar(this.options.username);
},
password() {
if (!this.options.password) this.error('A password is required');
return this.options.password;
return this.parseAsEnvVar(this.options.password);
},
endpointLogin() {
return `${this.hostname}/webapi/auth.cgi?api=SYNO.API.Auth&version=3&method=login&account=${this.username}&passwd=${this.password}&session=DownloadStation&format=sid`;