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/api_client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/clients/api_client.ts') diff --git a/src/clients/api_client.ts b/src/clients/api_client.ts index f2bcd35..a7b5e0d 100644 --- a/src/clients/api_client.ts +++ b/src/clients/api_client.ts @@ -1,16 +1,17 @@ import axios from "axios"; export class ApiClient { - readonly url = "http://localhost:5000/api"; + readonly url = "http://localhost:3000/api"; async get(path: string) { const request_url = `${ this.url }${ path }`; try { const response = await axios.get(request_url); + return response; } catch(error) { - console.log(error); + return error.response; } } } \ No newline at end of file -- cgit v1.2.3