MCPcopy Create free account
hub / github.com/ClydeTime/Surge / missions

Function missions

Script/Task/nga.js:141–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139}
140
141async function missions() {
142 const newBody = { ...JSON.parse(config.body) };
143 newBody["__lib"] = "mission";
144 newBody["__act"] = "get_default";
145 newBody["get_success_repeat"] = "1";
146 newBody["no_compatible_fix"] = "1";
147 const options = {
148 url: "https://ngabbs.com/nuke.php",
149 headers: {
150 "Content-Type": config.contentType,
151 Cookie: config.cookie,
152 "User-Agent": config.userAgent,
153 },
154 body: ObjectToFormData(newBody, config.contentType),
155 };
156
157 return await $.http.post(options).then(
158 (response) => {
159 const result = JSON.parse(response.body);
160 const mids = result.data[0].map((d) => d.id);
161 return mids;
162 }, (reason) => {
163 $.logErr(reason.err, reason);
164 return [];
165 });
166}
167
168async function checkInCountAdd(mid) {
169 const newBody = { ...JSON.parse(config.body) };

Callers 1

signNGAFunction · 0.85

Calls 4

ObjectToFormDataFunction · 0.85
parseMethod · 0.45
postMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected