Return response.data from axios

This commit is contained in:
Jerko Steiner 2019-01-20 00:48:13 +01:00
parent 26f106fcae
commit 4f17f8d6a9

View File

@ -27,12 +27,14 @@ export class HTTPClient<T extends IRoutes> implements IHTTPClient<T> {
return params.params![key]
})
return this.axios.request({
const response = await this.axios.request({
method: params.method,
url,
params: params.query,
data: params.body,
})
return response.data
}
get<P extends keyof T & string>(