mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55:12 +00:00
edit query
This commit is contained in:
parent
e783359aca
commit
eaad96aae3
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,
|
private emojiEntityService: EmojiEntityService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const emojis = await this.emojisRepository.find({
|
const emojis = await this.emojisRepository.createQueryBuilder()
|
||||||
where: {
|
.where('host IS NULL')
|
||||||
host: IsNull(),
|
.orderBy('LOWER(category)', 'ASC')
|
||||||
},
|
.orderBy('LOWER(name)', 'ASC')
|
||||||
order: {
|
.getMany()
|
||||||
category: 'ASC',
|
|
||||||
name: 'ASC',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
emojis: await this.emojiEntityService.packSimpleMany(emojis),
|
emojis: await this.emojiEntityService.packSimpleMany(emojis),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue