Example #1
0
 public IActionResult History(string authToken)
 {
     if (userAccountProvider.isLoggedIn(authToken))
     {
         return(Ok(transactionProvider.getTransactionHistory(authToken)));
     }
     return(BadRequest("User not presently logged in"));
 }
Example #2
0
 public async Task <IActionResult> History(string authToken)
 {
     try
     {
         if (await userAccountProvider.isLoggedIn(authToken))
         {
             return(Ok(await transactionProvider.getTransactionHistory(authToken)));
         }
         return(BadRequest("User not presently logged in"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }