Explorar el Código

repair get users assets

kunickyd hace 3 años
padre
commit
99aa51b19d
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      app.js

+ 4 - 2
app.js

@@ -49,8 +49,10 @@ app.get("/users/:userId/assets", async (req, res, next) => {
 
 app.get("/users/:userId/assets/:assetId", async (req, res, next) => {
     try {
-        let assets = (await fetchUsersAssets(req.params.userId)).assets;
-
+        let irohaResponse = await fetchUsersAssets(req.params.userId);
+        let irohaResponseJson = await irohaResponse.json();        
+        let assets = irohaResponseJson.assets;
+        
         let parsedAssetName = "";
         let i = 0;
         for (i; i < assets.length; i++) {