You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Move to new gamepass configuration endpoint
* Stringify non-string/stream form data
* Handle 200 responses correctly
* Actually fix the status code check this time
* Re-add iconChanged property in returned data
* ESLint no like, me fix
* Remove manually specified content-type header
@@ -62,21 +52,18 @@ function configureGamePass (gamePassId, name, description, price, icon, jar, tok
62
52
}
63
53
64
54
returnhttp(httpOpt).then(function(res){
65
-
constjson=JSON.parse(res.body)
66
-
if(json.isValid){
55
+
if(res.statusCode===200){
67
56
resolve({
68
57
gamePassId,
69
58
name,
70
59
description: description||'',
71
60
...price,
72
-
iconChanged: !!file// Boolean Cast
61
+
iconChanged: !!icon// Boolean Cast
73
62
})
74
63
}else{
75
64
constpriceComment=(typeof(price)==='number') ? ` | NOTE: Price has successfully been changed to ${price}R.` : ''
76
65
if(res.statusCode===403){
77
66
reject(newError(`You do not have permission to edit this game pass.${priceComment}`))
78
-
}elseif(json.error){
79
-
reject(newError(json.error+priceComment))// 'The name or description contains inappropriate text.' or 'Text filtering service is unavailable at this time.'
80
67
}else{
81
68
reject(newError(`An unexpected error occurred with status code ${res.statusCode}.${priceComment}`))
82
69
}
@@ -88,23 +75,22 @@ function configureGamePass (gamePassId, name, description, price, icon, jar, tok
88
75
// Configuring the name/description and Robux must be done in separate calls, albeit to the same end-point.
0 commit comments