summaryrefslogtreecommitdiff
path: root/src/clients/loader.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/loader.ts')
-rw-r--r--src/clients/loader.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clients/loader.ts b/src/clients/loader.ts
new file mode 100644
index 0000000..645ba88
--- /dev/null
+++ b/src/clients/loader.ts
@@ -0,0 +1,8 @@
+import { ApiClient } from "./api_client";
+
+export default async function loader(path: string, { params }) {
+ const client = new ApiClient();
+ const response = await client.get(path);
+
+ return response.data;
+} \ No newline at end of file