diff options
author | Florian Dold <florian@dold.me> | 2023-10-16 16:02:12 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-10-16 16:02:12 +0200 |
commit | aca3bc9423f15354913d0114cafbd4bd1782d801 (patch) | |
tree | 87fb37881edb20196e36bd31230584b385808ebc /packages/taler-util | |
parent | 925a97c2e3a52222cb28b2b64d80c0b01305defe (diff) |
-fix transaction query parsing
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/transactions-types.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts index 083124afa..88830d82b 100644 --- a/packages/taler-util/src/transactions-types.ts +++ b/packages/taler-util/src/transactions-types.ts @@ -43,6 +43,8 @@ import { codecForList, codecForAny, codecForBoolean, + codecForEither, + codecForConstString, } from "./codec.js"; import { RefreshReason, @@ -697,6 +699,15 @@ export const codecForTransactionsRequest = (): Codec<TransactionsRequest> => buildCodecForObject<TransactionsRequest>() .property("currency", codecOptional(codecForString())) .property("search", codecOptional(codecForString())) + .property( + "sort", + codecOptional( + codecForEither( + codecForConstString("ascending"), + codecForConstString("descending"), + ), + ), + ) .property("includeRefreshes", codecOptional(codecForBoolean())) .build("TransactionsRequest"); |