mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 01:39:06 +01:00
f3ea9a8ef6
投稿作成時に含まれている絵文字を保存しておくように SEE: https://github.com/syuilo/misskey/pull/3085#issuecomment-435608434
19 lines
371 B
TypeScript
19 lines
371 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const Emoji = db.get<IEmoji>('emoji');
|
|
Emoji.createIndex('name');
|
|
Emoji.createIndex('host');
|
|
Emoji.createIndex(['name', 'host'], { unique: true });
|
|
|
|
export default Emoji;
|
|
|
|
export type IEmoji = {
|
|
_id: mongo.ObjectID;
|
|
name: string;
|
|
host: string;
|
|
url: string;
|
|
aliases?: string[];
|
|
updatedAt?: Date;
|
|
};
|