aboutsummaryrefslogtreecommitdiff
path: root/src/requests.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-03-21 15:06:30 +0300
committereug-vs <eug-vs@keemail.me>2020-03-21 15:06:30 +0300
commitf3a684937565f3bd94034f3389aa95fea908f0c4 (patch)
treec01492bf8c06dc5409f9d8a30e807786dea90308 /src/requests.ts
parentde2a49bf1bf0e4c2f09ddcd0f2a86dff7062d8ea (diff)
downloadchrono-cube-ui-f3a684937565f3bd94034f3389aa95fea908f0c4.tar.gz
chore: fix linting errors :rotating_light:
Diffstat (limited to 'src/requests.ts')
-rw-r--r--src/requests.ts8
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