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

Function plant_request

jd_get_share_code.js:352–370  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

350 }
351
352 function plant_request(function_id, body = {}) {
353 return new Promise(async (resolve) => {
354 $.post(plant_taskUrl(function_id, body), (err, resp, data) => {
355 try {
356 if (err) {
357 console.log("种豆得豆: API查询请求失败 ‼️‼️");
358 console.log(`function_id:${function_id}`);
359 $.logErr(err);
360 } else {
361 data = JSON.parse(data);
362 }
363 } catch (e) {
364 $.logErr(e, resp);
365 } finally {
366 resolve(data);
367 }
368 });
369 });
370 }
371
372 function plant_taskUrl(function_id, body) {
373 body["version"] = "9.0.0.1";

Callers 1

plantBeanIndexFunction · 0.85

Calls 4

plant_taskUrlFunction · 0.85
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected