From 31cc5ecdb693be1da04ee0a3e6dc876535d5fb4b Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sun, 23 Apr 2023 13:12:25 -0600 Subject: AƱade loader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clients/loader.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/clients/loader.ts (limited to 'src/clients/loader.ts') 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 -- cgit v1.2.3