fix the Chinese translation parameter error of deeplx

This commit is contained in:
yuxiang
2023-10-30 22:31:52 +08:00
parent de77abe152
commit 0921cd6b9c

View File

@@ -203,7 +203,10 @@ function registerEndpoints(app, jsonParser) {
} }
const text = request.body.text; const text = request.body.text;
const lang = request.body.lang; let lang = request.body.lang;
if (request.body.lang === 'zh-CN') {
lang = 'ZH'
}
if (!text || !lang) { if (!text || !lang) {
return response.sendStatus(400); return response.sendStatus(400);