Skip to content

Commit

Permalink
Added default type description to Accounts Get Operation.
Browse files Browse the repository at this point in the history
Added null check to sort.Desc to AccountRepository.cs
  • Loading branch information
dmirgaleev authored and Groxan committed Dec 24, 2020
1 parent bec0010 commit 8d61c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tzkt.Api/Controllers/AccountsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public Task<Account> GetByAddress([Address] string address, bool metadata = fals
/// because all these types have an `initiator` field.
/// </remarks>
/// <param name="address">Account address (starting with tz or KT)</param>
/// <param name="type">Comma separated list of operation types to return (endorsement, ballot, proposal, activation, double_baking, double_endorsing, nonce_revelation, delegation, origination, transaction, reveal, migration, revelation_penalty, baking)</param>
/// <param name="type">Comma separated list of operation types to return (`endorsement`, `ballot`, `proposal`, `activation`, `double_baking`, `double_endorsing`, `nonce_revelation`, `delegation`, `origination`, `transaction`, `reveal`, `migration`, `revelation_penalty`, `baking`). If not specified then all operation types except `endorsement` and `baking` will be returned.</param>
/// <param name="initiator">Filters transactions, delegations and originations by initiator. Allowed fields for `.eqx` mode: none.</param>
/// <param name="sender">Filters transactions, delegations, originations, reveals and seed nonce revelations by sender. Allowed fields for `.eqx` mode: none.</param>
/// <param name="target">Filters transactions by target. Allowed fields for `.eqx` mode: none.</param>
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Api/Repositories/AccountRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2424,7 +2424,7 @@ OFFSET @offset
break;
}

return sort.Desc == null
return sort?.Desc == null
? result.OrderBy(x => x.Id).Take(limit)
: result.OrderByDescending(x => x.Id).Take(limit);
}
Expand Down

0 comments on commit 8d61c5b

Please sign in to comment.