Skip to content

Commit 0ebeba3

Browse files
committed
Apply lint
1 parent f247aee commit 0ebeba3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/client/rest/APIRequester.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ describe('APIRequester', () => {
5656
})
5757

5858
it('handles baseURL with path and endpoint without leading slash', async () => {
59-
mockedAxios.get.mockResolvedValueOnce({ data: null });
59+
mockedAxios.get.mockResolvedValueOnce({ data: null })
6060

61-
const request = new APIRequester('https://rest.testnet.initia.xyz/bar');
62-
await request.get('foo');
61+
const request = new APIRequester('https://rest.testnet.initia.xyz/bar')
62+
await request.get('foo')
6363

6464
expect(mockedAxios.get).toHaveBeenCalledWith(
6565
'https://rest.testnet.initia.xyz/bar/foo',
6666
{
6767
headers: new axios.AxiosHeaders(),
6868
params: {},
6969
}
70-
);
71-
});
70+
)
71+
})
7272
})

src/client/rest/APIRequester.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ export class APIRequester {
5252
}
5353

5454
private computeEndpoint(endpoint: string) {
55-
const relativeEndpoint = endpoint.replace(/^\/+/, '');
56-
const baseURLObject = new URL(this.baseURL);
55+
const relativeEndpoint = endpoint.replace(/^\/+/, '')
56+
const baseURLObject = new URL(this.baseURL)
5757

5858
if (!baseURLObject.pathname.endsWith('/')) {
59-
baseURLObject.pathname += '/';
59+
baseURLObject.pathname += '/'
6060
}
61-
baseURLObject.pathname += relativeEndpoint;
61+
baseURLObject.pathname += relativeEndpoint
6262

63-
return baseURLObject.toString();
63+
return baseURLObject.toString()
6464
}
6565

6666
public async getRaw<T>(

0 commit comments

Comments
 (0)