Skip to content

Commit a3237de

Browse files
committed
Fix output type for transfer routes
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
1 parent abae65b commit a3237de

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

docs/swagger/swagger.yaml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5267,13 +5267,30 @@ paths:
52675267
schema:
52685268
items:
52695269
properties:
5270-
balance: {}
5271-
identity:
5270+
amount: {}
5271+
created: {}
5272+
from:
5273+
type: string
5274+
key:
52725275
type: string
5276+
localId: {}
5277+
messageHash: {}
52735278
poolProtocolId:
52745279
type: string
5280+
protocolId:
5281+
type: string
5282+
to:
5283+
type: string
52755284
tokenIndex:
52765285
type: string
5286+
tx:
5287+
properties:
5288+
id: {}
5289+
type:
5290+
type: string
5291+
type: object
5292+
type:
5293+
type: string
52775294
type: object
52785295
type: array
52795296
description: Success
@@ -5871,13 +5888,30 @@ paths:
58715888
schema:
58725889
items:
58735890
properties:
5874-
balance: {}
5875-
identity:
5891+
amount: {}
5892+
created: {}
5893+
from:
5894+
type: string
5895+
key:
58765896
type: string
5897+
localId: {}
5898+
messageHash: {}
58775899
poolProtocolId:
58785900
type: string
5901+
protocolId:
5902+
type: string
5903+
to:
5904+
type: string
58795905
tokenIndex:
58805906
type: string
5907+
tx:
5908+
properties:
5909+
id: {}
5910+
type:
5911+
type: string
5912+
type: object
5913+
type:
5914+
type: string
58815915
type: object
58825916
type: array
58835917
description: Success

internal/apiserver/route_get_token_transfers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var getTokenTransfers = &oapispec.Route{
3737
FilterFactory: database.TokenTransferQueryFactory,
3838
Description: i18n.MsgTBD,
3939
JSONInputValue: nil,
40-
JSONOutputValue: func() interface{} { return []*fftypes.TokenAccount{} },
40+
JSONOutputValue: func() interface{} { return []*fftypes.TokenTransfer{} },
4141
JSONOutputCodes: []int{http.StatusOK},
4242
JSONHandler: func(r *oapispec.APIRequest) (output interface{}, err error) {
4343
return filterResult(r.Or.Assets().GetTokenTransfers(r.Ctx, r.PP["ns"], r.Filter))

internal/apiserver/route_get_token_transfers_by_pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var getTokenTransfersByPool = &oapispec.Route{
3939
FilterFactory: database.TokenTransferQueryFactory,
4040
Description: i18n.MsgTBD,
4141
JSONInputValue: nil,
42-
JSONOutputValue: func() interface{} { return []*fftypes.TokenAccount{} },
42+
JSONOutputValue: func() interface{} { return []*fftypes.TokenTransfer{} },
4343
JSONOutputCodes: []int{http.StatusOK},
4444
JSONHandler: func(r *oapispec.APIRequest) (output interface{}, err error) {
4545
return filterResult(r.Or.Assets().GetTokenTransfersByPool(r.Ctx, r.PP["ns"], r.PP["type"], r.PP["name"], r.Filter))

0 commit comments

Comments
 (0)