diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-11-05 10:42:46 +0900 |
|---|---|---|
| committer | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-11-05 10:42:46 +0900 |
| commit | 4e7fbd8967874e5fa27b618e9d3d7d29ac85315d (patch) | |
| tree | 776202add0b827a86f240ecc8c838594451342e7 /src/server | |
| parent | Fix #3115 (diff) | |
| download | sharkey-4e7fbd8967874e5fa27b618e9d3d7d29ac85315d.tar.gz sharkey-4e7fbd8967874e5fa27b618e9d3d7d29ac85315d.tar.bz2 sharkey-4e7fbd8967874e5fa27b618e9d3d7d29ac85315d.zip | |
Implement /api/v1/custom_emojis
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/api/mastodon.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/api/mastodon.ts b/src/server/api/mastodon.ts index a5b59e2e0f..33a0b4b5f1 100644 --- a/src/server/api/mastodon.ts +++ b/src/server/api/mastodon.ts @@ -4,12 +4,18 @@ import { toASCII } from 'punycode'; import config from '../../config'; import Meta from '../../models/meta'; import { ObjectID } from 'bson'; +import Emoji from '../../models/emoji'; const pkg = require('../../../package.json'); // Init router const router = new Router(); -router.get('/v1/custom_emojis', async ctx => ctx.body = {}); +router.get('/v1/custom_emojis', async ctx => ctx.body = + await Emoji.find({ host: null }, { + fields: { + _id: false + } + })); router.get('/v1/instance', async ctx => { // TODO: This is a temporary implementation. Consider creating helper methods! const meta = await Meta.findOne() || {}; |