Return response.data from axios
This commit is contained in:
parent
26f106fcae
commit
4f17f8d6a9
@ -27,12 +27,14 @@ export class HTTPClient<T extends IRoutes> implements IHTTPClient<T> {
|
|||||||
return params.params![key]
|
return params.params![key]
|
||||||
})
|
})
|
||||||
|
|
||||||
return this.axios.request({
|
const response = await this.axios.request({
|
||||||
method: params.method,
|
method: params.method,
|
||||||
url,
|
url,
|
||||||
params: params.query,
|
params: params.query,
|
||||||
data: params.body,
|
data: params.body,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return response.data
|
||||||
}
|
}
|
||||||
|
|
||||||
get<P extends keyof T & string>(
|
get<P extends keyof T & string>(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user