Skip to content

Commit c1d0715

Browse files
committed
chore: fix envId config
1 parent 375c70e commit c1d0715

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

mcp/src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AuthSupevisor } from '@cloudbase/toolbox'
33
const auth = AuthSupevisor.getInstance({
44
})
55

6-
export async function getCreatial() {
6+
export async function getLoginState() {
77
const {
88
TENCENTCLOUD_SECRETID,
99
TENCENTCLOUD_SECRETKEY,

mcp/src/cloudbase-manager.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import CloudBase from "@cloudbase/manager-node";
2-
import { getCreatial } from './auth.js'
2+
import { getLoginState } from './auth.js'
33

44
export async function getCloudBaseManager() {
5-
const loginState = await getCreatial()
5+
const loginState = await getLoginState()
66
const {
77
envId,
88
secretId,
99
secretKey,
1010
token
1111
} = loginState
12+
1213
const cloudbase = new CloudBase({
13-
envId,
14+
envId: process.env.CLOUDBASE_ENV_ID || envId,
1415
secretId,
1516
secretKey,
1617
token

0 commit comments

Comments
 (0)