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

Function checkInCountAdd

Script/Task/nga.js:168–190  ·  view source on GitHub ↗
(mid)

Source from the content-addressed store, hash-verified

166}
167
168async function checkInCountAdd(mid) {
169 const newBody = { ...JSON.parse(config.body) };
170 newBody["__lib"] = "mission";
171 newBody["__act"] = "checkin_count_add";
172 newBody["no_compatible_fix"] = "1";
173 newBody["mid"] = mid;
174 const options = {
175 url: "https://ngabbs.com/nuke.php",
176 headers: {
177 "Content-Type": config.contentType,
178 Cookie: config.cookie,
179 "User-Agent": config.userAgent,
180 },
181 body: ObjectToFormData(newBody, config.contentType),
182 };
183
184 await $.http.post(options).then(
185 (response) => {
186 console.log(`mission:${mid}`);
187 }, (reason) => {
188 $.logErr(reason.err, reason);
189 });
190}
191
192function FormDataToObject(form, contentType) {
193 const boundary = contentType.split("; ")[1].split("=")[1];

Callers 1

signNGAFunction · 0.85

Calls 5

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

Tested by

no test coverage detected