max: fix v3 loan/repay api path

This commit is contained in:
c9s 2022-06-02 01:41:41 +08:00
parent ae8625da31
commit 8aec251a62
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 6 additions and 6 deletions

View File

@ -149,14 +149,14 @@ type GetMarginLoanHistoryRequest struct {
limit *int `param:"limit"`
}
//go:generate PostRequest -url "/api/v3/wallet/m/loans/:currency" -type MarginLoanRequest -responseType .LoanRecord
//go:generate PostRequest -url "/api/v3/wallet/m/loan/:currency" -type MarginLoanRequest -responseType .LoanRecord
type MarginLoanRequest struct {
client requestgen.AuthenticatedAPIClient
currency string `param:"currency,slug,required"`
amount string `param:"amount"`
}
//go:generate PostRequest -url "/api/v3/wallet/m/repayments/:currency" -type MarginRepayRequest -responseType .RepaymentRecord
//go:generate PostRequest -url "/api/v3/wallet/m/repayment/:currency" -type MarginRepayRequest -responseType .RepaymentRecord
type MarginRepayRequest struct {
client requestgen.AuthenticatedAPIClient
currency string `param:"currency,slug,required"`

View File

@ -1,4 +1,4 @@
// Code generated by "requestgen -method POST -url /api/v3/wallet/m/loans/:currency -type MarginLoanRequest -responseType .LoanRecord"; DO NOT EDIT.
// Code generated by "requestgen -method POST -url /api/v3/wallet/m/loan/:currency -type MarginLoanRequest -responseType .LoanRecord"; DO NOT EDIT.
package v3
@ -143,7 +143,7 @@ func (m *MarginLoanRequest) Do(ctx context.Context) (*LoanRecord, error) {
}
query := url.Values{}
apiURL := "/api/v3/wallet/m/loans/:currency"
apiURL := "/api/v3/wallet/m/loan/:currency"
slugs, err := m.GetSlugsMap()
if err != nil {
return nil, err

View File

@ -1,4 +1,4 @@
// Code generated by "requestgen -method POST -url /api/v3/wallet/m/repayments/:currency -type MarginRepayRequest -responseType .RepaymentRecord"; DO NOT EDIT.
// Code generated by "requestgen -method POST -url /api/v3/wallet/m/repayment/:currency -type MarginRepayRequest -responseType .RepaymentRecord"; DO NOT EDIT.
package v3
@ -143,7 +143,7 @@ func (m *MarginRepayRequest) Do(ctx context.Context) (*RepaymentRecord, error) {
}
query := url.Values{}
apiURL := "/api/v3/wallet/m/repayments/:currency"
apiURL := "/api/v3/wallet/m/repayment/:currency"
slugs, err := m.GetSlugsMap()
if err != nil {
return nil, err