summaryrefslogtreecommitdiff
path: root/src/FundLab.Api/App.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/FundLab.Api/App.fs')
-rw-r--r--src/FundLab.Api/App.fs30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/FundLab.Api/App.fs b/src/FundLab.Api/App.fs
index 839a641..97787aa 100644
--- a/src/FundLab.Api/App.fs
+++ b/src/FundLab.Api/App.fs
@@ -57,19 +57,6 @@ type FundApiResponse =
status: string
}
-type SubscriptionOrderApiResponse =
- {
- id: Guid
- fundId: Guid
- fundCode: string
- amount: string
- feeAmount: string
- reservedTotal: string
- status: string
- submittedAt: string
- isSynthetic: bool
- }
-
type ConfirmedQuoteEvidenceResponse =
{
navDate: string
@@ -198,20 +185,7 @@ module App =
status = fund.Status
}
- let private orderResponse (order: SubscriptionOrderRecord) : SubscriptionOrderApiResponse =
- {
- id = order.Id
- fundId = order.FundId
- fundCode = order.FundCode
- amount = cashText order.Amount
- feeAmount = cashText order.FeeAmount
- reservedTotal = cashText order.ReservedTotal
- status = order.Status
- submittedAt = timestampText order.SubmittedAt
- isSynthetic = order.IsSynthetic
- }
-
- let private confirmationResponse (order: SubscriptionOrderRecord) : SubscriptionOrderDetailResponse =
+ let private orderResponse (order: SubscriptionOrderRecord) : SubscriptionOrderDetailResponse =
let quoteEvidence =
order.ConfirmedQuote
|> Option.map (fun quote ->
@@ -461,7 +435,7 @@ module App =
match repository.ConfirmSubscriptionOrder(idempotencyKey, fundId, orderId) with
| OrderConfirmed order
| ConfirmReplayed order
- | ConfirmPendingNav order -> json (confirmationResponse order) next ctx
+ | ConfirmPendingNav order -> json (orderResponse order) next ctx
| ConfirmIdempotencyConflict ->
errorResponse 409 "IDEMPOTENCY_CONFLICT" "idempotency key was used with a different request" next ctx
| ConfirmAlreadyConfirmed ->