Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 1af8280

Browse files
committed
feat: add comment to axios.ts
1 parent 4a3ef38 commit 1af8280

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/plugins/libraries/axios.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import Vue from 'vue'
77
import { setToken, unsetToken, getTokenFromCookie } from '@/utilities/'
88

99
export default ({ $axios, app, req, error }): void => {
10+
/**
11+
* $axios.onRequest
12+
*/
1013
$axios.onRequest(
1114
(config: AxiosRequestConfig): void => {
1215
const token = getTokenFromCookie(req)
@@ -19,6 +22,9 @@ export default ({ $axios, app, req, error }): void => {
1922
}
2023
)
2124

25+
/**
26+
* $axios.onResponse
27+
*/
2228
$axios.onResponse(
2329
(response): void => {
2430
const token = response.headers[app.$C.ACCESS_TOKEN_NAME]
@@ -35,6 +41,9 @@ export default ({ $axios, app, req, error }): void => {
3541
}
3642
)
3743

44+
/**
45+
* $axios.onResponseError
46+
*/
3847
$axios.onResponseError(
3948
(response: AxiosError): void => {
4049
console.log('$axios.onResponseError')

0 commit comments

Comments
 (0)