refactor: make provider lowercase because supporting case insensitive is allegedly protocol bloat

This commit is contained in:
P. Reis
2024-10-07 17:54:03 -03:00
parent 4712cb1d80
commit bfab84d937
4 changed files with 5 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ export const translatorMiddleware: AppMiddleware = async (c, next) => {
const translationProvider = Conf.translationProvider;
switch (translationProvider) {
case 'DeepL'.toLowerCase():
case 'deepl':
if (apiKey) {
c.set(
'translator',
@@ -19,7 +19,7 @@ export const translatorMiddleware: AppMiddleware = async (c, next) => {
);
}
break;
case 'Libretranslate'.toLowerCase():
case 'libretranslate':
if (apiKey) {
c.set(
'translator',