Skip to content

Commit

Permalink
修复:防止静态检查的报错
Browse files Browse the repository at this point in the history
  • Loading branch information
guobao2333 committed Sep 26, 2024
1 parent c9eb569 commit 70b8e11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function post(req, res) {
});
}

const { text, source_lang, target_lang, alt_count } = req.body;
let { text, source_lang, target_lang, alt_count } = req.body;

// 是否允许备选翻译
if (!allowAlternative && alt_count !== undefined) {
Expand All @@ -71,7 +71,7 @@ async function post(req, res) {
"code": 405,
"message": "Alternative Translate Not Allowed"
});
alt_count = 0;
// alt_count = 0;
}

try {
Expand Down

0 comments on commit 70b8e11

Please sign in to comment.