修复统计报表
This commit is contained in:
@@ -957,13 +957,14 @@ public sealed class StatisticsController(
|
||||
async token =>
|
||||
{
|
||||
var source = await factory(token);
|
||||
if (source.Result is not null || source.Value is null)
|
||||
var data = source.Result is ObjectResult { Value: not null } objectResult
|
||||
? objectResult.Value
|
||||
: source.Value;
|
||||
if (data is null)
|
||||
throw new InvalidOperationException(
|
||||
"Statistics cache source did not return a successful value.");
|
||||
|
||||
return JsonSerializer.SerializeToElement(
|
||||
source.Value,
|
||||
source.Value.GetType());
|
||||
return JsonSerializer.SerializeToElement(data, data.GetType());
|
||||
},
|
||||
AppCacheProfile.Analytics,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user