Skip to content

Commit

Permalink
roblox/api: use binarytype for string clientsettings request
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Oct 28, 2023
1 parent dcf22b8 commit d5db58d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions roblox/api/clientsettings.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package api

import (
"github.com/vinegarhq/vinegar/roblox"
)

type ClientVersion struct {
Version string `json:"version"`
ClientVersionUpload string `json:"clientVersionUpload"`
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion roblox/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d5db58d

Please sign in to comment.