add: libretranslate
This commit is contained in:
parent
c5440c20c6
commit
40599190f7
8 changed files with 190 additions and 59 deletions
|
|
@ -107,6 +107,8 @@ export const paramDef = {
|
|||
deeplIsPro: { type: 'boolean' },
|
||||
deeplFreeMode: { type: 'boolean' },
|
||||
deeplFreeInstance: { type: 'string', nullable: true },
|
||||
libreTranslateURL: { type: 'string', nullable: true },
|
||||
libreTranslateKey: { type: 'string', nullable: true },
|
||||
enableEmail: { type: 'boolean' },
|
||||
email: { type: 'string', nullable: true },
|
||||
smtpSecure: { type: 'boolean' },
|
||||
|
|
@ -577,6 +579,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
}
|
||||
|
||||
if (ps.libreTranslateURL !== undefined) {
|
||||
if (ps.libreTranslateURL === '') {
|
||||
set.libreTranslateURL = null;
|
||||
} else {
|
||||
set.libreTranslateURL = ps.libreTranslateURL;
|
||||
}
|
||||
}
|
||||
|
||||
if (ps.libreTranslateKey !== undefined) {
|
||||
if (ps.libreTranslateKey === '') {
|
||||
set.libreTranslateKey = null;
|
||||
} else {
|
||||
set.libreTranslateKey = ps.libreTranslateKey;
|
||||
}
|
||||
}
|
||||
|
||||
if (ps.enableIpLogging !== undefined) {
|
||||
set.enableIpLogging = ps.enableIpLogging;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue