Skip to content

Commit 96d7864

Browse files
committed
feat: 处理云梯api未环境变量
1 parent 5b28f89 commit 96d7864

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ export const hmacSha1 = (text: string, key: string) => {
292292
export const getYunTiApiUrl = (): string => {
293293
const apiKey = process.env.SLS_YUNTI_API_KEY || '';
294294
const apiSecret = process.env.SLS_YUNTI_API_SECRET || '';
295+
const apiUrl = process.env.SLS_YUNTI_API_URL;
295296
const timeStamp = Math.floor(Date.now() / 1000);
296297
const apiSign = hmacSha1(`${timeStamp}${apiKey}`, apiSecret);
297-
const url = `http://api.yunti.oa.com/apply/api?api_key=${apiKey}&api_ts=${timeStamp}&api_sign=${apiSign}`;
298+
const url = `${apiUrl}?api_key=${apiKey}&api_ts=${timeStamp}&api_sign=${apiSign}`;
298299
return url;
299300
};
300301

0 commit comments

Comments
 (0)