Skip to content

Commit f648bb4

Browse files
committed
fix: local endpoints
1 parent cce4a36 commit f648bb4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/clients/local/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ import type {
1616
StandardAxiosResponse,
1717
UrlConfig,
1818
} from "../common/types";
19-
import {
20-
LOCAL_ENDPOINTS,
21-
type LocalEndpoint,
22-
type LocalEndpointUrl,
23-
} from "./endpoints";
19+
import { type LocalEndpoint, type LocalEndpointUrl } from "./endpoints";
2420
import { type FindEndpoint } from "./types";
2521

2622
export const localApiClientOptionsSchema = z.object({
@@ -78,12 +74,10 @@ export class LocalApiClient {
7874
MethodConfig<NoInfer<TEndpoint["methods"]>[number]>
7975
>
8076
): Promise<StandardAxiosResponse<TSchema>> {
81-
const endpoint = LOCAL_ENDPOINTS.find(e => e.url === url);
82-
8377
const config = args[0];
8478
return this.axios({
8579
headers: this.getHeaders(),
86-
...(endpoint ? { baseURL: this.getServerUrl() } : {}),
80+
...(!url.startsWith("http") ? { baseURL: this.getServerUrl() } : {}),
8781
url: buildUrl(url, { ...config?.path }),
8882
...config,
8983
});

0 commit comments

Comments
 (0)