File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff 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" ;
2420import { type FindEndpoint } from "./types" ;
2521
2622export 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 } ) ;
You can’t perform that action at this time.
0 commit comments