Merge pull request #1301 from zgce/release

fix the deeplx for chinese parameter
This commit is contained in:
Cohee 2023-10-30 16:36:57 +02:00 committed by GitHub
commit 064d331110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,7 +203,10 @@ function registerEndpoints(app, jsonParser) {
}
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) {
return response.sendStatus(400);