mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 00:10:14 +00:00
merge: make emoji categories and names case insensitive. (!746)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/746 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
482538c7f8
1 changed files with 5 additions and 10 deletions
|
@ -50,16 +50,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private emojiEntityService: EmojiEntityService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const emojis = await this.emojisRepository.find({
|
||||
where: {
|
||||
host: IsNull(),
|
||||
},
|
||||
order: {
|
||||
category: 'ASC',
|
||||
name: 'ASC',
|
||||
},
|
||||
});
|
||||
|
||||
const emojis = await this.emojisRepository.createQueryBuilder()
|
||||
.where('host IS NULL')
|
||||
.orderBy('LOWER(category)', 'ASC')
|
||||
.orderBy('LOWER(name)', 'ASC')
|
||||
.getMany()
|
||||
return {
|
||||
emojis: await this.emojiEntityService.packSimpleMany(emojis),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue