summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/meta.ts
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-10-21 00:43:39 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-10-21 00:43:39 +0900
commit4c6c06c80afd3e2309b305f40c2e67e48863bf31 (patch)
treed9d24139b126867a3ff1f4e893175aea05ebd01e /src/server/api/endpoints/meta.ts
parentAdd ssl to elasticsearch config settings (#5527) (diff)
downloadsharkey-4c6c06c80afd3e2309b305f40c2e67e48863bf31.tar.gz
sharkey-4c6c06c80afd3e2309b305f40c2e67e48863bf31.tar.bz2
sharkey-4c6c06c80afd3e2309b305f40c2e67e48863bf31.zip
Improve emoji-picker (#5515)
* Improve emoji-picker * remove unimplanted translation * カテゴリのサジェスト * use unique
Diffstat (limited to 'src/server/api/endpoints/meta.ts')
-rw-r--r--src/server/api/endpoints/meta.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts
index 0b56a9d4ef..153780e3fa 100644
--- a/src/server/api/endpoints/meta.ts
+++ b/src/server/api/endpoints/meta.ts
@@ -96,7 +96,19 @@ export const meta = {
export default define(meta, async (ps, me) => {
const instance = await fetchMeta(true);
- const emojis = await Emojis.find({ where: { host: null }, cache: { id: 'meta_emojis', milliseconds: 3600000 } }); // 1 hour
+ const emojis = await Emojis.find({
+ where: {
+ host: null
+ },
+ order: {
+ category: 'ASC',
+ name: 'ASC'
+ },
+ cache: {
+ id: 'meta_emojis',
+ milliseconds: 3600000 // 1 hour
+ }
+ });
const response: any = {
maintainerName: instance.maintainerName,
@@ -144,6 +156,7 @@ export default define(meta, async (ps, me) => {
id: e.id,
aliases: e.aliases,
name: e.name,
+ category: e.category,
url: e.url,
})),
enableEmail: instance.enableEmail,