fix: Do not convert langs to lowercase

This commit is contained in:
Essem 2024-02-03 13:26:29 -06:00
parent 112272c254
commit 4f45e72799
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
6 changed files with 6 additions and 29 deletions

View file

@ -380,13 +380,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}
if (ps.lang) {
if (!Object.keys(langmap).includes(ps.lang.toLowerCase())) throw new Error('invalid param');
ps.lang = ps.lang.toLowerCase();
} else {
ps.lang = null;
}
let channel: MiChannel | null = null;
if (ps.channelId != null) {
channel = await this.channelsRepository.findOneBy({ id: ps.channelId, isArchived: false });