fix: lint issue

This commit is contained in:
mutoe 2020-11-07 13:32:24 +08:00 committed by plumrx
parent de40b2b333
commit 2c852b0601
1 changed files with 7 additions and 7 deletions

View File

@ -55,11 +55,11 @@ export default class FetchRequest {
}
private runFetch ({ method, url, data, options }: {
method: 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH',
url: string,
data?: Record<string, any>,
options: Partial<FetchRequestOptions>
}) {
method: 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH',
url: string,
data?: Record<string, any>,
options: Partial<FetchRequestOptions>
}) {
const finalUrl = this.generateFinalUrl(url, options)
const headers = this.generateFinalHeaders(options)
@ -68,11 +68,11 @@ export default class FetchRequest {
return fetch(finalUrl, fetchOptions)
}
private runSafeFetch (method: 'GET' | 'DELETE', url:string, options: Partial<FetchRequestOptions>) {
private runSafeFetch (method: 'GET' | 'DELETE', url: string, options: Partial<FetchRequestOptions>) {
return this.runFetch({ method, url, options })
}
private runUnsafeFetch (method: 'POST' | 'PUT' | 'PATCH', url:string, data: Record<string, any> = {}, options: Partial<FetchRequestOptions>) {
private runUnsafeFetch (method: 'POST' | 'PUT' | 'PATCH', url: string, data: Record<string, any> = {}, options: Partial<FetchRequestOptions> = {}) {
return this.runFetch({ method, url, options, data })
}