1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-02-17 19:27:29 -06:00

backend: fix make emoji categories and names case insensitive

This commit is contained in:
fly_mc 2024-11-20 00:32:08 +08:00
parent 75d49c9262
commit a131e4d9e9

View file

@ -50,11 +50,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private emojiEntityService: EmojiEntityService, private emojiEntityService: EmojiEntityService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const emojis = await this.emojisRepository.createQueryBuilder() const emojis = await this.emojisRepository.createQueryBuilder('emoji')
.where('host IS NULL') .where('emoji.host IS NULL')
.orderBy('LOWER(category)', 'ASC') .orderBy('LOWER(emoji.category)', 'ASC')
.orderBy('LOWER(name)', 'ASC') .addOrderBy('LOWER(emoji.name)', 'ASC')
.getMany() .getMany();
return { return {
emojis: await this.emojiEntityService.packSimpleMany(emojis), emojis: await this.emojiEntityService.packSimpleMany(emojis),