汉化
This commit is contained in:
@@ -10,7 +10,9 @@ export default function handler(req, res) {
|
||||
// authenticate
|
||||
const { token } = req.body;
|
||||
if (!authenticate(token)) {
|
||||
res.status(401).json({ error: "Unauthorized" });
|
||||
res.status(401).json({
|
||||
error: `token ${token} 验证失败`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
// jsonfiy
|
||||
@@ -21,9 +23,6 @@ export default function handler(req, res) {
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
// 500 error
|
||||
res.status(500).json({
|
||||
error: "Method not allowed",
|
||||
});
|
||||
res.status(405).send({ error: "方法" + req.method + "不被允许" });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user