diff --git a/server/marketserver/api/v1/asset/asset.go b/server/marketserver/api/v1/asset/asset.go index 35a2c901..c7009834 100644 --- a/server/marketserver/api/v1/asset/asset.go +++ b/server/marketserver/api/v1/asset/asset.go @@ -59,5 +59,9 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? LIMIT %d`, p.ContractAddress = ds.GetByName("contract_address") p.TokenId = ds.GetByName("token_id") }) - f5.GetSysLog().Info("dafdf") + rspObj := struct { + Page *common.StreamPagination `json:"page"` + Rows []interface{} `json:"rows"` + }{} + c.JSON(200, rspObj) } diff --git a/server/marketserver/common/types.go b/server/marketserver/common/types.go index fd539e50..7ae18e2d 100644 --- a/server/marketserver/common/types.go +++ b/server/marketserver/common/types.go @@ -1,6 +1,8 @@ package common import ( + "q5" + "f5" ) type NftHomeMeta struct { @@ -34,6 +36,12 @@ type OrderUpdatedEvent struct { } `json:"data"` } +type StreamPagination struct { + NextCursor string `json:"next_cursor"` + PreviousCursor string `json:"previous_cursor"` + Remaining int32 `json:"remaining"` +} + type NftCache interface { } @@ -57,3 +65,10 @@ type TaskMgr interface{ type CacheMgr interface{ } + + +func (this* StreamPagination) FillPage(page *f5.StreamPagination) { + this.NextCursor = q5.ToString(page.NextCursor) + this.PreviousCursor = q5.ToString(page.PreviousCursor) + this.Remaining = page.Remaining +}