Skip to content

Commit

Permalink
fix(cli): fix axios type error (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyoct authored Mar 9, 2023
1 parent 2e9f654 commit 5f8b487
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cli/src/api/debug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios, { InternalAxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios'
import axios, { AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios'
import * as urlencode from 'urlencode'

export async function invokeFunction(
Expand Down Expand Up @@ -26,7 +26,7 @@ const request = axios.create({

// request interceptor
request.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
(config: AxiosRequestConfig) => {
let _headers: AxiosRequestHeaders | any = {
'Content-Type': 'application/json',
}
Expand Down
6 changes: 3 additions & 3 deletions cli/src/util/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// request.ts
import axios, { InternalAxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios'
import axios, { AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse } from 'axios'
import { existSystemConfig, readSystemConfig, refreshToken } from '../config/system'
import { DEFAULT_REMOTE_SERVER } from '../common/constant'

Expand All @@ -11,7 +11,7 @@ export const request = axios.create({

// request interceptor
request.interceptors.request.use(
async (config: InternalAxiosRequestConfig) => {
async (config: AxiosRequestConfig) => {
let _headers: AxiosRequestHeaders | any = {
'Content-Type': 'application/json',
}
Expand Down Expand Up @@ -74,7 +74,7 @@ request.interceptors.response.use(
} else if (statusCode === 500) {
console.log('Internal server error!')
process.exit(1)
}else if (statusCode === 503) {
} else if (statusCode === 503) {
console.log('The server is abnormal, please contact the administrator!')
process.exit(1)
}
Expand Down

0 comments on commit 5f8b487

Please sign in to comment.