summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-09 04:14:26 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-09 04:14:26 +0900
commitc78945436e39121f46e083eac7a6572ca2efe2d2 (patch)
treeb26036a9f38bda54b865e704f8bcd477f2caac0e /src/models
parentサーバーの統計情報をメモリに記憶するようにするなど (diff)
downloadsharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.gz
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.bz2
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.zip
#1686
Diffstat (limited to 'src/models')
-rw-r--r--src/models/note.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models/note.ts b/src/models/note.ts
index ad8c1565f0..d4681b7b70 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -16,6 +16,9 @@ import Following from './following';
const Note = db.get<INote>('notes');
Note.createIndex('uri', { sparse: true, unique: true });
Note.createIndex('userId');
+Note.createIndex({
+ createdAt: -1
+});
export default Note;
export function isValidText(text: string): boolean {