This commit is contained in:
syuilo
2018-10-02 00:34:37 +09:00
parent 35362ed3c7
commit f56adce51f
5 changed files with 8 additions and 44 deletions

View File

@ -27,21 +27,6 @@ Note.createIndex({
});
export default Note;
// 後方互換性のため
Note.findOne({
fileIds: { $exists: true }
}).then(n => {
if (n == null) {
Note.update({}, {
$rename: {
mediaIds: 'fileIds'
}
}, {
multi: true
});
}
});
export function isValidText(text: string): boolean {
return length(text.trim()) <= 1000 && text.trim() != '';
}