mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 15:14:41 +00:00
Misc code improvements
This commit is contained in:
parent
6265aa7271
commit
4e190b7dfd
3 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
|||
private sealed class MeowResponse {
|
||||
#pragma warning disable 649
|
||||
[JsonProperty(PropertyName = "file", Required = Required.Always)]
|
||||
internal readonly string? Link;
|
||||
internal readonly string Link = "";
|
||||
#pragma warning restore 649
|
||||
|
||||
[JsonConstructor]
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
|||
internal sealed class ResponseData {
|
||||
#pragma warning disable 649
|
||||
[JsonProperty(PropertyName = "data", Required = Required.Always)]
|
||||
internal readonly InternalData? Data;
|
||||
internal readonly InternalData Data = new();
|
||||
#pragma warning restore 649
|
||||
|
||||
#pragma warning disable 649
|
||||
|
@ -55,7 +55,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
|||
#pragma warning restore 649
|
||||
|
||||
[JsonConstructor]
|
||||
private InternalData() { }
|
||||
internal InternalData() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -460,7 +460,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
|
|||
|
||||
WebBrowser.ObjectResponse<ResponseData>? response = await ASF.WebBrowser.UrlPostToJsonObject<ResponseData, RequestData>(request, data: requestData, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors).ConfigureAwait(false);
|
||||
|
||||
if ((response?.Content?.Data == null) || response.StatusCode.IsClientErrorCode()) {
|
||||
if ((response?.Content == null) || response.StatusCode.IsClientErrorCode()) {
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.WarningFailed);
|
||||
|
||||
#if NETFRAMEWORK
|
||||
|
|
Loading…
Reference in a new issue