diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 09:54:53 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-18 09:54:53 +0900 |
| commit | 80e5645a84cc60d76f79c48a3d565fb66ad88643 (patch) | |
| tree | 1e2fc1c6c9ffb7989c5db997eae906c013433eda /src/server/api/endpoints/users/show.ts | |
| parent | Merge pull request #1738 from rinsuki/features/ts-noimplicitany-true (diff) | |
| download | sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.gz sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.bz2 sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.zip | |
wip
Diffstat (limited to 'src/server/api/endpoints/users/show.ts')
| -rw-r--r-- | src/server/api/endpoints/users/show.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index b8c6ff25c4..bf7e2a2312 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -1,8 +1,5 @@ -/** - * Module dependencies - */ import $ from 'cafy'; import ID from '../../../../cafy-id'; -import User, { pack } from '../../../../models/user'; +import User, { pack, ILocalUser } from '../../../../models/user'; import resolveRemoteUser from '../../../../remote/resolve-user'; const cursorOption = { fields: { data: false } }; @@ -10,7 +7,7 @@ const cursorOption = { fields: { data: false } }; /** * Show user(s) */ -module.exports = (params, me) => new Promise(async (res, rej) => { +module.exports = (params: any, me: ILocalUser) => new Promise(async (res, rej) => { let user; // Get 'userId' parameter @@ -49,7 +46,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { return rej('failed to resolve remote user'); } } else { - const q = userId !== undefined + const q: any = userId !== undefined ? { _id: userId } : { usernameLower: username.toLowerCase(), host: null }; |