Skip to content

Commit

Permalink
thinks linting issues (methinks) and removed stale commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Campbell authored and Cameron Campbell committed Aug 14, 2024
1 parent 235bc43 commit 5873e36
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions lib/util/getCurrentUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ exports.func = async function ({ jar, option }) {
constructRequest(`//premiumfeatures.roblox.com/v1/users/${userId}/validate-membership`, jar)
])

const thumbnail = thumbnailReq.status == "fulfilled" && thumbnailReq.value?.[0].imageUrl
const robux = robuxReq.status == "fulfilled" && robuxReq.value.body?.robux
const thumbnail = thumbnailReq.status == "fulfilled" && thumbnailReq.value[0].imageUrl
const robux = robuxReq.status == "fulfilled" && robuxReq.value.body.robux
const premium = premiumReq.status == "fulfilled" && premiumReq.value.body

const json = {
Expand All @@ -50,30 +50,6 @@ exports.func = async function ({ jar, option }) {
return json[searchKey]

} catch (e) { throw Error("Could not get current user!", e) }

/*const jar = args.jar
const option = args.option
const httpOpt = {
url: '//www.roblox.com/mobileapi/userinfo',
options: {
resolveWithFullResponse: true,
method: 'GET',
followRedirect: true,
jar
}
}
const res = await http(httpOpt)
if (res.statusCode !== 200) {
throw new Error('You are not logged in.')
}
const json = JSON.parse(res.body)
if (!option) {
return json
}
const searchKey = Object.keys(json).filter((key) => {
return option.toLowerCase() === key.toLowerCase()
})[0]
return json[searchKey]*/
}


Expand Down

0 comments on commit 5873e36

Please sign in to comment.