Skip to content

Commit d26be85

Browse files
committed
refactor(rpc-client): use DEFAULT_BASE_URL constant
Replace hard-coded 'https://api.stackone.com' fallback URL with the DEFAULT_BASE_URL constant from consts.ts for consistency.
1 parent acb31a2 commit d26be85

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/rpc-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USER_AGENT } from './consts';
1+
import { DEFAULT_BASE_URL, USER_AGENT } from './consts';
22
import { STACKONE_HEADER_KEYS } from './headers';
33
import {
44
type RpcActionRequest,
@@ -26,7 +26,7 @@ export class RpcClient {
2626

2727
constructor(config: RpcClientConfig) {
2828
const validatedConfig = rpcClientConfigSchema.parse(config);
29-
this.baseUrl = validatedConfig.serverURL || 'https://api.stackone.com';
29+
this.baseUrl = validatedConfig.serverURL || DEFAULT_BASE_URL;
3030
const username = validatedConfig.security.username;
3131
const password = validatedConfig.security.password || '';
3232
this.authHeader = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`;

0 commit comments

Comments
 (0)