Limit NFT objes returned
This commit is contained in:
parent
b228e5bea5
commit
a8060a0ca6
2 changed files with 2 additions and 1 deletions
|
|
@ -3111,6 +3111,7 @@ vector<nft_object> database_api_impl::nft_get_all_tokens(const nft_id_type lower
|
||||||
FC_ASSERT(limit <= api_limit_nft_tokens,
|
FC_ASSERT(limit <= api_limit_nft_tokens,
|
||||||
"Number of querying nft tokens can not be greater than ${configured_limit}",
|
"Number of querying nft tokens can not be greater than ${configured_limit}",
|
||||||
("configured_limit", api_limit_nft_tokens));
|
("configured_limit", api_limit_nft_tokens));
|
||||||
|
|
||||||
const auto &idx_nft = _db.get_index_type<nft_index>().indices().get<by_id>();
|
const auto &idx_nft = _db.get_index_type<nft_index>().indices().get<by_id>();
|
||||||
vector<nft_object> result;
|
vector<nft_object> result;
|
||||||
result.reserve(limit);
|
result.reserve(limit);
|
||||||
|
|
|
||||||
|
|
@ -2572,7 +2572,7 @@ class wallet_api
|
||||||
/**
|
/**
|
||||||
* @brief Returns all tokens
|
* @brief Returns all tokens
|
||||||
* @param limit the maximum number of NFT objects to return (max: 100)
|
* @param limit the maximum number of NFT objects to return (max: 100)
|
||||||
* @param lowerbound the symbol of the first NFT object to include in the list.
|
* @param lowerbound token_id the symbol of the first NFT object to include in the list.
|
||||||
* @return Returns vector of NFT objects, empty vector if none
|
* @return Returns vector of NFT objects, empty vector if none
|
||||||
*/
|
*/
|
||||||
vector<nft_object> nft_get_all_tokens(uint32_t limit, optional<nft_id_type> lower_id) const;
|
vector<nft_object> nft_get_all_tokens(uint32_t limit, optional<nft_id_type> lower_id) const;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue