Update note-reaction.ts

This commit is contained in:
syuilo 2018-10-28 21:41:39 +09:00 committed by GitHub
parent 80d0c0cf74
commit 22d0d11895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ import Reaction from './note-reaction';
import { pack as packUser } from './user';
const NoteReaction = db.get<INoteReaction>('noteReactions');
NoteReaction.createIndex('noteId');
NoteReaction.createIndex('userId');
NoteReaction.createIndex(['userId', 'noteId'], { unique: true });
export default NoteReaction;