merge: Improve my previous emoji endpoints patch. (!869)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/869 Closes #893 Approved-by: Marie <github@yuugi.dev> Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
commit
8bf01d9731
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IsNull } from 'typeorm';
|
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import type { EmojisRepository } from '@/models/_.js';
|
import type { EmojisRepository } from '@/models/_.js';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
|
@ -59,7 +58,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
const emojis = await this.emojisRepository.createQueryBuilder()
|
const emojis = await this.emojisRepository.createQueryBuilder()
|
||||||
.where('host IS NULL')
|
.where('host IS NULL')
|
||||||
.orderBy('LOWER(category)', 'ASC')
|
.orderBy('LOWER(category)', 'ASC')
|
||||||
.orderBy('LOWER(name)', 'ASC')
|
.addOrderBy('LOWER(name)', 'ASC')
|
||||||
.getMany();
|
.getMany();
|
||||||
return {
|
return {
|
||||||
emojis: await this.emojiEntityService.packSimpleMany(emojis),
|
emojis: await this.emojiEntityService.packSimpleMany(emojis),
|
||||||
|
|
Loading…
Add table
Reference in a new issue