Exemplo n.º 1
0
 public IActionResult CurrentBalance(string authToken)
 {
     if (userAccountProvider.isLoggedIn(authToken))
     {
         return(Ok(ledgerProvider.getCurrentBalance(authToken)));
     }
     return(BadRequest("User not presently logged in"));
 }
 public async Task <IActionResult> CurrentBalance(string authToken)
 {
     try
     {
         if (await userAccountProvider.isLoggedIn(authToken))
         {
             return(Ok(await ledgerProvider.getCurrentBalance(authToken)));
         }
         return(BadRequest("User not presently logged in"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }