Skip to content

Commit d1d0173

Browse files
committed
fix: remove check file in puth method
1 parent 9b324f5 commit d1d0173

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/core/BaseService.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ class BaseService {
8484
put<T>(id: string | number, payload?: any, config?: AxiosRequestConfig) {
8585
const parameter = id && !isObject(id) ? `/${id}` : ''
8686
const body = isObject(id) ? id : payload
87-
const requestType: Method = hasFiles(body) ? 'post' : 'put'
88-
if (hasFiles(body)) {
89-
Object.assign(body, { _method: 'put' })
90-
}
91-
return this.submit<T>(requestType, parameter, body, config)
87+
return this.submit<T>('put', parameter, body, config)
9288
}
9389

9490
patch<T>(payload: any): Promise<T>

0 commit comments

Comments
 (0)