summaryrefslogtreecommitdiff
path: root/src/misc/fetch-proxy-account.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-04-13 01:43:22 +0900
committerGitHub <noreply@github.com>2019-04-13 01:43:22 +0900
commit987168b863c52d0548050ffbac569782bb9a8cef (patch)
treec9aa2243dcdcbd044688d201a51c601574bff259 /src/misc/fetch-proxy-account.ts
parentFix bug (diff)
downloadmisskey-987168b863c52d0548050ffbac569782bb9a8cef.tar.gz
misskey-987168b863c52d0548050ffbac569782bb9a8cef.tar.bz2
misskey-987168b863c52d0548050ffbac569782bb9a8cef.zip
strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
Diffstat (limited to 'src/misc/fetch-proxy-account.ts')
-rw-r--r--src/misc/fetch-proxy-account.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/fetch-proxy-account.ts b/src/misc/fetch-proxy-account.ts
index d60fa9b313..17b021e91e 100644
--- a/src/misc/fetch-proxy-account.ts
+++ b/src/misc/fetch-proxy-account.ts
@@ -1,8 +1,9 @@
import fetchMeta from './fetch-meta';
import { ILocalUser } from '../models/entities/user';
import { Users } from '../models';
+import { ensure } from '../prelude/ensure';
export async function fetchProxyAccount(): Promise<ILocalUser> {
const meta = await fetchMeta();
- return await Users.findOne({ username: meta.proxyAccount, host: null }) as ILocalUser;
+ return await Users.findOne({ username: meta.proxyAccount!, host: null }).then(ensure) as ILocalUser;
}