mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 20:49:06 +01:00
Fix bug
This commit is contained in:
parent
d49cd86961
commit
b10b62a448
@ -26,6 +26,21 @@ Note.createIndex({
|
|||||||
});
|
});
|
||||||
export default Note;
|
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 {
|
export function isValidText(text: string): boolean {
|
||||||
return length(text.trim()) <= 1000 && text.trim() != '';
|
return length(text.trim()) <= 1000 && text.trim() != '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user