Skip to content

Commit 80fa193

Browse files
committed
fix type in updateclient for meta endpoint
1 parent 75fb9b2 commit 80fa193

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Client/UpdateClient/UpdateClient.Meta.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public partial class UpdateClient
88
/// <summary>
99
/// Query the sources of the configured version caches on the server. Does not require admin token.
1010
/// </summary>
11-
/// <returns>A <see cref="Dictionary{string,VersionCacheSource}"/>, or null if any non-200 series HTTP status code is returned from the server.</returns>
12-
public async Task<Dictionary<string, VersionCacheSource>?> QueryCacheSourcesAsync()
11+
/// <returns>A <see cref="CacheSourceMapping"/>, or null if any non-200 series HTTP status code is returned from the server.</returns>
12+
public async Task<CacheSourceMapping?> QueryCacheSourcesAsync()
1313
{
1414
Log("Checking for cache sources from: {0}", [QualifyUriPath(Constants.FullRouteName_Api_Meta)]);
1515

@@ -22,6 +22,6 @@ public partial class UpdateClient
2222
return null;
2323
}
2424

25-
return await resp.Content.ReadFromJsonAsync(JsonSerializerContexts.Default.DictionaryStringVersionCacheSource);
25+
return await resp.Content.ReadFromJsonAsync(JsonSerializerContexts.Default.CacheSourceMapping);
2626
}
2727
}

src/Common/JsonSerializerContexts.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ namespace Ryujinx.Systems.Update.Common;
66
[JsonSerializable(typeof(VersionResponse[]))]
77
[JsonSerializable(typeof(IEnumerable<VersionCacheEntry>))]
88
[JsonSerializable(typeof(IEnumerable<VersionResponse>))]
9-
[JsonSerializable(typeof(Dictionary<string, VersionCacheSource>))]
9+
[JsonSerializable(typeof(CacheSourceMapping))]
1010
public partial class JsonSerializerContexts : JsonSerializerContext;

0 commit comments

Comments
 (0)