diff options
Diffstat (limited to 'src/models/note-reaction.ts')
| -rw-r--r-- | src/models/note-reaction.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/models/note-reaction.ts b/src/models/note-reaction.ts index 9bf467f222..706ae54c16 100644 --- a/src/models/note-reaction.ts +++ b/src/models/note-reaction.ts @@ -1,4 +1,5 @@ import * as mongo from 'mongodb'; +import $ from 'cafy'; import deepcopy = require('deepcopy'); import db from '../db/mongodb'; import Reaction from './note-reaction'; @@ -16,6 +17,18 @@ export interface INoteReaction { reaction: string; } +export const validateReaction = $.str.or([ + 'like', + 'love', + 'laugh', + 'hmm', + 'surprise', + 'congrats', + 'angry', + 'confused', + 'pudding' +]); + /** * NoteReactionを物理削除します */ |