fix: added http method put override
This commit is contained in:
parent
317e0f6485
commit
703be44aca
3 changed files with 26 additions and 4 deletions
|
|
@ -11,20 +11,20 @@ import {
|
|||
import { Observable } from 'rxjs';
|
||||
import { TransactionSplitService } from '../../services/transaction-split.service';
|
||||
|
||||
@Controller('transaction-split')
|
||||
@Controller('transaction/split')
|
||||
export class TransactionSplitController {
|
||||
constructor(
|
||||
private readonly transactionSplitService: TransactionSplitService
|
||||
) {}
|
||||
|
||||
@Post('split')
|
||||
@Post()
|
||||
createSplit(
|
||||
@Body() payload: PsCreateSplitRequestModel
|
||||
): Observable<PsCreateSplitResponseModel> {
|
||||
return this.transactionSplitService.createSplit(payload);
|
||||
}
|
||||
|
||||
@Get('split')
|
||||
@Get()
|
||||
listSplit(
|
||||
@Query() queryParamsPayload: PsListSplitRequestModel
|
||||
): Observable<PsListSplitResponseModel> {
|
||||
|
|
|
|||
|
|
@ -44,4 +44,26 @@ export class CustomHttpService extends HttpService {
|
|||
headers: this.axiosRequestConfig.headers
|
||||
});
|
||||
}
|
||||
|
||||
override put<T>(
|
||||
url: string,
|
||||
data?: unknown,
|
||||
config?: AxiosRequestConfig
|
||||
): Observable<AxiosResponse<T>> {
|
||||
return super.post<T>(url, data, {
|
||||
...config,
|
||||
headers: this.axiosRequestConfig.headers
|
||||
});
|
||||
}
|
||||
|
||||
override delete<T>(
|
||||
url: string,
|
||||
data?: unknown,
|
||||
config?: AxiosRequestConfig
|
||||
): Observable<AxiosResponse<T>> {
|
||||
return super.post<T>(url, data, {
|
||||
...config,
|
||||
headers: this.axiosRequestConfig.headers
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
PsUpdateSplitRequestModel
|
||||
} from '../../models';
|
||||
import { Observable } from 'rxjs';
|
||||
import { PsUpdateSplitResponseModel } from '../../models/transaction-split/ps-update-split-response.model';
|
||||
import { PsUpdateSplitResponseModel } from '../../models';
|
||||
|
||||
@Injectable()
|
||||
export class PsTransactionSplitService {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue