Skip to content

Commit

Permalink
fix: post missing data (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 authored Aug 13, 2021
1 parent 190a729 commit ca99368
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/axios/src/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Configuration } from '@midwayjs/decorator';
import { join } from 'path';
import { HttpService } from './servicManager';
import { HttpService } from './serviceManager';

@Configuration({
namespace: 'axios',
Expand Down
2 changes: 1 addition & 1 deletion packages/axios/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AutoConfiguration as Configuration } from './configuration';
export * from './interface';
export * from './servicManager';
export * from './serviceManager';
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ export class HttpService implements AxiosHttpService {
data?: any,
config?: AxiosRequestConfig
): Promise<R> {
return this.instance.post(url, config);
return this.instance.post(url, data, config);
}

put<T = any, R = AxiosResponse<T>>(
url: string,
data?: any,
config?: AxiosRequestConfig
): Promise<R> {
return this.instance.put(url, config);
return this.instance.put(url, data, config);
}

patch<T = any, R = AxiosResponse<T>>(
url: string,
data?: any,
config?: AxiosRequestConfig
): Promise<R> {
return this.instance.patch(url, config);
return this.instance.patch(url, data, config);
}
}

0 comments on commit ca99368

Please sign in to comment.