diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-29 21:06:23 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-29 21:06:23 +0900 |
| commit | 108dcb3e611d833e82c2dc3b8f0ccf5552597bc1 (patch) | |
| tree | 29ffd5409c002985cfe0f97ae23664fc23af7bb9 /src/models/follow-request.ts | |
| parent | User blocking (Following part) (#3035) (diff) | |
| download | misskey-108dcb3e611d833e82c2dc3b8f0ccf5552597bc1.tar.gz misskey-108dcb3e611d833e82c2dc3b8f0ccf5552597bc1.tar.bz2 misskey-108dcb3e611d833e82c2dc3b8f0ccf5552597bc1.zip | |
物理削除系の処理を削除
これらの処理はパフォーマンス的に現実的でないし、すべてのモデルの関係を把握している必要があり保守が困難
論理削除でなんとかする
Diffstat (limited to 'src/models/follow-request.ts')
| -rw-r--r-- | src/models/follow-request.ts | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/models/follow-request.ts b/src/models/follow-request.ts index 01d4b8ce6b..02b2a85b9f 100644 --- a/src/models/follow-request.ts +++ b/src/models/follow-request.ts @@ -29,33 +29,6 @@ export type IFollowRequest = { }; /** - * FollowRequestを物理削除します - */ -export async function deleteFollowRequest(followRequest: string | mongo.ObjectID | IFollowRequest) { - let f: IFollowRequest; - - // Populate - if (isObjectId(followRequest)) { - f = await FollowRequest.findOne({ - _id: followRequest - }); - } else if (typeof followRequest === 'string') { - f = await FollowRequest.findOne({ - _id: new mongo.ObjectID(followRequest) - }); - } else { - f = followRequest as IFollowRequest; - } - - if (f == null) return; - - // このFollowingを削除 - await FollowRequest.remove({ - _id: f._id - }); -} - -/** * Pack a request for API response */ export const pack = ( |