Skip to content

Commit

Permalink
Fix addDeveloperProduct not returning a product id (#751)
Browse files Browse the repository at this point in the history
* Update addDeveloperProduct.js

* Changed to use Single Quotes

* Added +

---------

Co-authored-by: Josh <[email protected]>
  • Loading branch information
iamEvanYT and Neztore authored Feb 14, 2024
1 parent 52491ea commit 1e80b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/games/addDeveloperProduct.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const nextFunction = (jar, token, universeId, name, priceInRobux, description) =
}).then((res) => {
if (res.Success && res.Message === 'Name available') {
return http({
url: `//apis.roblox.com/developer-products/v1/universes/${universeId}/developerproducts?name=${name}&description=${description}&priceInRobux=${priceInRobux}`,
url: '//apis.roblox.com/developer-products/v1/universes/' + universeId + '/developerproducts?name=' + name + '&description=' + description + '&priceInRobux=' + priceInRobux,
options: {
method: 'POST',
jar: jar,
Expand All @@ -47,7 +47,7 @@ const nextFunction = (jar, token, universeId, name, priceInRobux, description) =
productId: typeof res.body === 'object' ? res.body.id : JSON.parse(res.body).id
}
} else {
throw new Error(`Create product failed, ${res.statusCode} ${res.statusMessage}`)
throw new Error('Create product failed, ' + res.statusCode + ' ' + res.statusMessage + '')
}
})
} else {
Expand Down

0 comments on commit 1e80b2d

Please sign in to comment.