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

Function createInviteUser

jd_small_home.js:483–511  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

481 })
482}
483function createInviteUser() {
484 return new Promise(resolve => {
485 $.get(taskUrl(`/ssjj-task-record/createInviteUser`), (err, resp, data) => {
486 try {
487 if (err) {
488 console.log(`${JSON.stringify(err)}`)
489 console.log(`${$.name} API请求失败,请检查网路重试`)
490 } else {
491 if (safeGet(data)) {
492 data = JSON.parse(data);
493 if (data.head.code === 200) {
494 if (data.body) {
495 if (data.body.id) {
496 console.log(`\n您的${$.name}shareCode(每天都是变化的):【${data.body.id}】\n`);
497 $.shareCode = data.body.id;
498 $.newShareCodes.push({ 'code': data.body.id, 'token': $.token, cookie });
499 }
500 }
501 }
502 }
503 }
504 } catch (e) {
505 $.logErr(e, resp)
506 } finally {
507 resolve(data);
508 }
509 })
510 })
511}
512
513function createAssistUser(inviteId, taskId) {
514 console.log(`${inviteId}, ${taskId}`, `${cookie}`);

Callers 1

smallHomeFunction · 0.85

Calls 5

taskUrlFunction · 0.70
safeGetFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected