MCPcopy Create free account
hub / github.com/Semporia/Scripts / updateInviteCode

Function updateInviteCode

jd_small_home.js:777–793  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

775 })
776}
777function updateInviteCode(url) {
778 return new Promise(resolve => {
779 $.get({url}, async (err, resp, data) => {
780 try {
781 if (err) {
782 console.log(`${JSON.stringify(err)}`)
783 } else {
784 $.inviteCodes = JSON.parse(data);
785 }
786 } catch (e) {
787 $.logErr(e, resp)
788 } finally {
789 resolve();
790 }
791 })
792 })
793}
794function updateInviteCodeCDN(url) {
795 return new Promise(async resolve => {
796 $.get({url, headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")}, timeout: 200000}, async (err, resp, data) => {

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected