From d5db58d923e4d5f40bb1e4098dabf4e6e8e63f16 Mon Sep 17 00:00:00 2001 From: sewn Date: Sat, 28 Oct 2023 11:53:27 +0300 Subject: [PATCH] roblox/api: use binarytype for string clientsettings request --- roblox/api/clientsettings.go | 8 ++------ roblox/version/version.go | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/roblox/api/clientsettings.go b/roblox/api/clientsettings.go index e476b63f..dff88931 100644 --- a/roblox/api/clientsettings.go +++ b/roblox/api/clientsettings.go @@ -1,9 +1,5 @@ package api -import ( - "github.com/vinegarhq/vinegar/roblox" -) - type ClientVersion struct { Version string `json:"version"` ClientVersionUpload string `json:"clientVersionUpload"` @@ -12,10 +8,10 @@ type ClientVersion struct { NextClientVersion string `json:"nextClientVersion,omitempty"` } -func GetClientVersion(bt roblox.BinaryType, channel string) (ClientVersion, error) { +func GetClientVersion(binaryType string, channel string) (ClientVersion, error) { var cv ClientVersion - ep := "v2/client-version/" + bt.BinaryName() + ep := "v2/client-version/" + binaryType if channel != "" { ep += "/channel/" + channel } diff --git a/roblox/version/version.go b/roblox/version/version.go index 88b7bd25..5b6c4efa 100644 --- a/roblox/version/version.go +++ b/roblox/version/version.go @@ -44,7 +44,7 @@ func Fetch(bt roblox.BinaryType, channel string) (Version, error) { log.Printf("Fetching latest version of %s for channel %s", bt.BinaryName(), channel) - cv, err := api.GetClientVersion(bt, channel) + cv, err := api.GetClientVersion(bt.BinaryName(), channel) if err != nil { return Version{}, err }