Skip to content

Commit

Permalink
#942 检查Cookie是否过期并打印日志
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed Dec 27, 2024
1 parent 4d727dc commit 298fac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/BiliLite.UWP/Modules/User/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ public async Task<bool> RefreshToken()
/// <returns></returns>
public async Task CheckUpdateCookies()
{
if (!SettingService.GetValue(SettingConstants.Account.IS_WEB_LOGIN, false)) return;
var checkResult = await CheckCookies();
if (!SettingService.GetValue(SettingConstants.Account.IS_WEB_LOGIN, false)) return;
if (!checkResult.Refresh)
{
return;
Expand All @@ -530,6 +530,7 @@ private async Task<CheckCookieResult> CheckCookies()
var api = new AccountApi().CheckCookies();
var result = await api.Request();
var checkCookieResult = await result.GetData<CheckCookieResult>();
_logger.Info($"检查Cookie结果:{checkCookieResult.data.Refresh}");
return checkCookieResult.data;
}

Expand Down

0 comments on commit 298fac8

Please sign in to comment.