diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 14:28:43 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 14:28:43 +0900 |
| commit | e66d7babc5ae477d7a60628e5599f9c390426c81 (patch) | |
| tree | 84733fc7b2a158e6d5786ccd72a58e40c301f140 /src/models | |
| parent | wip (diff) | |
| download | sharkey-e66d7babc5ae477d7a60628e5599f9c390426c81.tar.gz sharkey-e66d7babc5ae477d7a60628e5599f9c390426c81.tar.bz2 sharkey-e66d7babc5ae477d7a60628e5599f9c390426c81.zip | |
yatta
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/note.ts | 4 | ||||
| -rw-r--r-- | src/models/user.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/models/note.ts b/src/models/note.ts index 83cd93353b..af6f6f7c01 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -220,7 +220,7 @@ export const pack = async ( hide = false; } else { // 指定されているかどうか - const specified = _note.visibleUserIds.some(id => id.equals(meId)); + const specified = _note.visibleUserIds.some((id: mongo.ObjectID) => id.equals(meId)); if (specified) { hide = false; @@ -272,7 +272,7 @@ export const pack = async ( } // Populate media - _note.media = hide ? [] : Promise.all(_note.mediaIds.map(fileId => + _note.media = hide ? [] : Promise.all(_note.mediaIds.map((fileId: mongo.ObjectID) => packFile(fileId) )); diff --git a/src/models/user.ts b/src/models/user.ts index 942faeeff4..0d1be439e9 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -1,6 +1,6 @@ import * as mongo from 'mongodb'; const deepcopy = require('deepcopy'); -import sequential = require('promise-sequential'); +const sequential = require('promise-sequential'); import rap from '@prezzemolo/rap'; import db from '../db/mongodb'; import Note, { pack as packNote, deleteNote } from './note'; |