Skip to content

Commit

Permalink
bugfix 修正 ADDWISHLIST 命令
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Mar 23, 2024
1 parent 88e823a commit 19b2f32
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ASFEnhance/Data/WebApi/AJaxFollowResponse.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using ArchiSteamFarm.Steam.Data;
using ASFEnhance.Data.Common;
using System.Text.Json.Serialization;

namespace ASFEnhance.Data;

internal sealed record AJaxFollowResponse
{
[JsonPropertyName("success")]
public ResultResponse? Success { get; set; }
public BaseResultResponse? Success { get; set; }
}
3 changes: 2 additions & 1 deletion ASFEnhance/Profile/WebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses;
using ASFEnhance.Data;
using ASFEnhance.Data.Common;
using SteamKit2;
using System.Net;
using System.Net.Http.Headers;
Expand Down Expand Up @@ -252,7 +253,7 @@ internal static async Task<bool> CraftBadge(Bot bot, SemaphoreSlim semaphore, ui
{ "levels", "1" },
};

var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);
var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<BaseResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);

return response?.Content?.Result == EResult.OK;
}
Expand Down
1 change: 0 additions & 1 deletion ASFEnhance/WishList/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using ArchiSteamFarm.Steam;
using System.Text;


namespace ASFEnhance.Wishlist;

internal static class Command
Expand Down
5 changes: 3 additions & 2 deletions ASFEnhance/WishList/WebRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ASFEnhance.Data;
using ASFEnhance.Data.Common;
using SteamKit2;

namespace ASFEnhance.Wishlist;
Expand All @@ -24,7 +25,7 @@ internal static async Task<bool> AddWishlist(this Bot bot, uint gameId)
{ "appid", gameId.ToString() },
};

var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);
var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<BaseResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);

if (response == null)
{
Expand Down Expand Up @@ -55,7 +56,7 @@ internal static async Task<bool> RemoveWishlist(this Bot bot, uint gameId)
{ "appid", gameId.ToString() },
};

var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);
var response = await bot.ArchiWebHandler.UrlPostToJsonObjectWithSession<BaseResultResponse>(request, data: data, referer: referer).ConfigureAwait(false);

if (response == null)
{
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>2.1.2.3</Version>
<Version>2.1.2.4</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion wiki
Submodule wiki updated from c73a94 to d3c1e9

0 comments on commit 19b2f32

Please sign in to comment.