Skip to content

Commit d3861c2

Browse files
refactor(cc-addon-credentials-beta.smart-otoroshi): avoid using env vars
- Use `operator.initialCredentials` to retrieve initial user & password instead of environment variables
1 parent 5d263ec commit d3861c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/cc-addon-credentials-beta/cc-addon-credentials-beta.smart-otoroshi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ class Api extends CcAddonCredentialsBetaClient {
283283
return [
284284
{
285285
code: 'user',
286-
value: operator.envVars.CC_OTOROSHI_INITIAL_ADMIN_LOGIN,
286+
value: operator.initialCredentials.user,
287287
},
288288
{
289289
code: 'password',
290-
value: operator.envVars.CC_OTOROSHI_INITIAL_ADMIN_PASSWORD,
290+
value: operator.initialCredentials.password,
291291
},
292292
{
293293
code: 'ng',

src/operators.types.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ export interface OtoroshiOperatorInfo {
8888
features: {
8989
networkGroup: null;
9090
};
91+
initialCredentials: {
92+
user: string;
93+
password: string;
94+
};
9195
envVars: {
9296
ADMIN_API_CLIENT_ID: string;
9397
ADMIN_API_CLIENT_SECRET: string;

0 commit comments

Comments
 (0)