它说我失踪了。有人能帮助我吗?这是the link。
var bodyParser = require('body-parser');
app.use(bodyParser.json()); // support json encoded bodies
app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
app.post('/savegrades', function(req, res) {
console.log("Class index: " + req.body.classIndex);
console.log(req.body);
res.send(200);
});
答案 0 :(得分:1)
这就是使用适当缩进的原因,
if (typeof scriptTwoLoaded === "undefined") {
var scriptTwoLoaded = true;
var hideRockCount = false;
var RockCaught = 0;
}
MPP.client.on(
"a",
(msg) => {
if (msg.a.indexOf(MPP.client.getOwnParticipant().name + " Finished digging " )!== -1 && msg.p._id === ("d45525193b7bfaba58aa23ad")) {
MPP.chat.send("~dig")
}
}
);
请参阅它的可读性。
是的,还有一个额外的'}'在最后一行。它应该是'}});'