diff options
Diffstat (limited to 'src/requests.ts')
-rw-r--r-- | src/requests.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/requests.ts b/src/requests.ts index eeb2ee7..961d8d6 100644 --- a/src/requests.ts +++ b/src/requests.ts @@ -1,22 +1,22 @@ -import axios from 'axios' +import axios, { AxiosResponse } from 'axios'; const baseUrl = 'https://eugvs.pythonanywhere.com/'; const baseApiUrl = baseUrl + 'api/'; -export const get = (url: string) => { +export const get = (url: string): Promise<AxiosResponse> => { return axios.get( baseApiUrl + url, ); }; -export const post = (url: string, data: object) => { +export const post = (url: string, data: object): Promise<AxiosResponse> => { return axios.post( baseApiUrl + url, data ); }; -export const del = (url: string, data: object) => { +export const del = (url: string, data: object): Promise<AxiosResponse> => { return axios.delete( baseApiUrl + url, data |