[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated: comments
From: |
gnunet |
Subject: |
[taler-docs] branch master updated: comments |
Date: |
Sun, 08 Aug 2021 18:33:18 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository docs.
The following commit(s) were added to refs/heads/master by this push:
new e281299 comments
e281299 is described below
commit e28129903772b99ad63613ba203c2d0dd20937c9
Author: Florian Dold <florian@dold.me>
AuthorDate: Sun Aug 8 18:33:12 2021 +0200
comments
---
merchant-spec/public-orders-get.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/merchant-spec/public-orders-get.ts
b/merchant-spec/public-orders-get.ts
index d46475f..20b893a 100644
--- a/merchant-spec/public-orders-get.ts
+++ b/merchant-spec/public-orders-get.ts
@@ -16,6 +16,7 @@ interface MerchantOrderInfo {
lastPaidSessionId?: string;
}
+// Data from the client's request to /orders/{id}
interface Req {
orderId: string;
contractHash?: string;
@@ -24,15 +25,19 @@ interface Req {
accept: "json" | "html";
}
+// (Abstract) response to /orders/{id}
interface Resp {
httpStatus: string;
+ // Schema type of the response
responseType: string;
// Additional details about response
response?: any;
}
+// Abstracted merchant database
type MerchantOrderStore = { [orderId: string]: MerchantOrderInfo };
+// Logic for /orders/{id}
function handlePublicOrdersGet(mos: MerchantOrderStore, req: Req): Resp {
const ord = mos[req.orderId];
if (!ord) {
@@ -132,6 +137,7 @@ function handlePublicOrdersGet(mos: MerchantOrderStore,
req: Req): Resp {
};
}
+// Helper to find an already paid order ID.
function findAlreadyPaid(
mos: MerchantOrderStore,
sessionId: string
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-docs] branch master updated: comments,
gnunet <=