[API] Implement some Emoji APIs

This commit is contained in:
syuilo
2018-11-04 03:18:32 +09:00
parent 31c3f6abf7
commit 3487ddabea
5 changed files with 117 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import * as mongo from 'mongodb';
import db from '../db/mongodb';
const Emoji = db.get<IEmoji>('emoji');
@@ -8,6 +9,7 @@ Emoji.createIndex(['name', 'host'], { unique: true });
export default Emoji;
export type IEmoji = {
_id: mongo.ObjectID;
name: string;
host: string;
url: string;