summaryrefslogtreecommitdiff
path: root/src/clients
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients')
-rw-r--r--src/clients/api_client.ts2
-rw-r--r--src/clients/loaders.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/clients/api_client.ts b/src/clients/api_client.ts
index 0e96c36..9a0d3f5 100644
--- a/src/clients/api_client.ts
+++ b/src/clients/api_client.ts
@@ -3,7 +3,7 @@ import axios from "axios";
export class ApiClient {
readonly url = "http://localhost:3000/api";
- async get(path: string) {
+ async get(path: string, params?: URLSearchParams) {
const request_url = `${ this.url }${ path }`;
const response = await this.makeRequest(request_url);
diff --git a/src/clients/loaders.ts b/src/clients/loaders.ts
index 43c1581..334f8aa 100644
--- a/src/clients/loaders.ts
+++ b/src/clients/loaders.ts
@@ -3,7 +3,7 @@ import { ApiClient } from "./api_client";
export async function loader({ request }) {
const client = new ApiClient();
const url = new URL(request.url)
- const response = await client.get(url.pathname);
+ const response = await client.get(`${url.pathname}${url.search}`);
return response;
}