1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-27 05:33:23 +00:00

clear push token after logout

This commit is contained in:
Kyle Spearrin
2016-08-06 15:21:59 -04:00
parent 638b3288b4
commit 35da8dd4ed
3 changed files with 10 additions and 18 deletions

View File

@@ -43,11 +43,11 @@ namespace Bit.App.Repositories
}
}
public virtual async Task<ApiResult<DeviceResponse>> PutClearTokenAsync(string identifier)
public virtual async Task<ApiResult> PutClearTokenAsync(string identifier)
{
if(!Connectivity.IsConnected)
{
return HandledNotConnected<DeviceResponse>();
return HandledNotConnected();
}
using(var client = new ApiHttpClient())
@@ -59,14 +59,7 @@ namespace Bit.App.Repositories
};
var response = await client.SendAsync(requestMessage);
if(!response.IsSuccessStatusCode)
{
return await HandleErrorAsync<DeviceResponse>(response);
}
var responseContent = await response.Content.ReadAsStringAsync();
var responseObj = JsonConvert.DeserializeObject<DeviceResponse>(responseContent);
return ApiResult<DeviceResponse>.Success(responseObj, response.StatusCode);
return ApiResult.Success(response.StatusCode);
}
}
}