1
0
forked from mirror/misskey

Implement /api/v1/custom_emojis (#3116)

This commit is contained in:
Acid Chicken (硫酸鶏) 2018-11-05 10:45:57 +09:00 committed by syuilo
parent a86c419f95
commit a1a3ee44b5

View File

@ -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() || {};