From 7435c62d922a84b0d8475fde31ad03c789bf1920 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Tue, 26 Mar 2024 07:06:05 +0100 Subject: [PATCH] Fix /link_google_play payload --- Assets/Stash/Scripts/Core/StashClient.cs | 5 +---- Assets/Stash/Scripts/Core/StashConstants.cs | 2 +- Assets/Stash/Scripts/Models/LinkGooglePlayGamesBody.cs | 8 +------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Assets/Stash/Scripts/Core/StashClient.cs b/Assets/Stash/Scripts/Core/StashClient.cs index 7247c75..24c09c8 100644 --- a/Assets/Stash/Scripts/Core/StashClient.cs +++ b/Assets/Stash/Scripts/Core/StashClient.cs @@ -143,10 +143,7 @@ public static async Task LinkGooglePlayGames(string challenge, str var requestBody = new LinkGooglePlayGamesBody() { codeChallenge = challenge, - verification = new LinkGooglePlayGamesBody.Verification() - { - authCode = authCode - }, + authCode = authCode, user = new LinkGooglePlayGamesBody.User() { id = playerId diff --git a/Assets/Stash/Scripts/Core/StashConstants.cs b/Assets/Stash/Scripts/Core/StashConstants.cs index 64576d3..a3220d4 100644 --- a/Assets/Stash/Scripts/Core/StashConstants.cs +++ b/Assets/Stash/Scripts/Core/StashConstants.cs @@ -7,6 +7,6 @@ public class StashConstants public const string LinkAccount = "/sdk/link_code/link"; public const string LinkAppleGameCenter = "/sdk/link_code/link_apple_game_center"; - public const string LinkGooglePlayGames = "/sdk/link_code/link_google_play_games"; + public const string LinkGooglePlayGames = "/sdk/link_code/link_google_play"; } } diff --git a/Assets/Stash/Scripts/Models/LinkGooglePlayGamesBody.cs b/Assets/Stash/Scripts/Models/LinkGooglePlayGamesBody.cs index f2cf764..9241d93 100644 --- a/Assets/Stash/Scripts/Models/LinkGooglePlayGamesBody.cs +++ b/Assets/Stash/Scripts/Models/LinkGooglePlayGamesBody.cs @@ -6,15 +6,9 @@ namespace Stash.Models public class LinkGooglePlayGamesBody { public string codeChallenge; - public Verification verification; + public string authCode; public User user; - [Serializable] - public class Verification - { - public string authCode; - } - [Serializable] public class User {