From f3a684937565f3bd94034f3389aa95fea908f0c4 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 21 Mar 2020 15:06:30 +0300 Subject: chore: fix linting errors :rotating_light: --- src/requests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/requests.ts') 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 => { return axios.get( baseApiUrl + url, ); }; -export const post = (url: string, data: object) => { +export const post = (url: string, data: object): Promise => { return axios.post( baseApiUrl + url, data ); }; -export const del = (url: string, data: object) => { +export const del = (url: string, data: object): Promise => { return axios.delete( baseApiUrl + url, data -- cgit v1.2.3