Pārlūkot izejas kodu

load tx details

kunickyd 3 gadi atpakaļ
vecāks
revīzija
c141e1ea72
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      app.ts

+ 4 - 2
app.ts

@@ -61,13 +61,15 @@ app.post("/buy", async (req, res, next) => {
             throw Error(JSON.stringify({ error: { name: "Error, request body has no \"txHash\" property!" } }));
         }
 
-        //TODO load from headers, or something like that??
+        //TODO load from http headers, or something like that??
         if (!req.body.user) {
             res.status(400);
             throw Error(JSON.stringify({ error: { name: "Error, request body has no \"user\" property!" } }));
         }
 
-        let txDetail = await getTransactionDetail(req.body.txHash, "kunicykd@test");
+        let txDetail = await getTransactionDetail(req.body.txHash, req.body.user);
+
+        
 
         res.send(txDetail);
     }