diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 06:24:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 06:24:31 +0900 |
| commit | ac50bb92252d999e6417eaaa585fd957f52d59cf (patch) | |
| tree | 4cb7b4d32e7e5dc1e1f2dd12daf7f94fc8c81e46 /src/server/api/private | |
| parent | 整理 (diff) | |
| download | misskey-ac50bb92252d999e6417eaaa585fd957f52d59cf.tar.gz misskey-ac50bb92252d999e6417eaaa585fd957f52d59cf.tar.bz2 misskey-ac50bb92252d999e6417eaaa585fd957f52d59cf.zip | |
Resolve #3137
Diffstat (limited to 'src/server/api/private')
| -rw-r--r-- | src/server/api/private/signup.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index d6eba69817..ab7342d6b8 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -67,6 +67,8 @@ export default async (ctx: Koa.Context) => { return; } + const usersCount = await User.count({}); + // Fetch exist user that same username const usernameExist = await User .count({ @@ -106,6 +108,7 @@ export default async (ctx: Koa.Context) => { token: secret, email: null, password: hash, + isAdmin: config.autoAdmin && usersCount === 0, profile: { bio: null, birthday: null, |