1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-12 22:33:25 +00:00

Await async calls after loading. Added ConfigureAwaits throughout API repositories. Formatting.

This commit is contained in:
Kyle Spearrin
2016-08-16 19:20:41 -04:00
parent 83bcd39791
commit 2c05c9595b
16 changed files with 126 additions and 109 deletions

View File

@@ -34,10 +34,10 @@ namespace Bit.App.Repositories
try
{
var response = await client.SendAsync(requestMessage);
var response = await client.SendAsync(requestMessage).ConfigureAwait(false);
if(!response.IsSuccessStatusCode)
{
return await HandleErrorAsync(response);
return await HandleErrorAsync(response).ConfigureAwait(false);
}
return ApiResult.Success(response.StatusCode);
@@ -61,15 +61,16 @@ namespace Bit.App.Repositories
var requestMessage = new TokenHttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri(client.BaseAddress, string.Concat(ApiRoute, "/identifier/", identifier, "/clear-token")),
RequestUri = new Uri(client.BaseAddress,
string.Concat(ApiRoute, "/identifier/", identifier, "/clear-token"))
};
try
{
var response = await client.SendAsync(requestMessage);
var response = await client.SendAsync(requestMessage).ConfigureAwait(false);
if(!response.IsSuccessStatusCode)
{
return await HandleErrorAsync(response);
return await HandleErrorAsync(response).ConfigureAwait(false);
}
return ApiResult.Success(response.StatusCode);