Skip to content
Snippets Groups Projects
Unverified Commit 5fcf5bc6 authored by syuilo's avatar syuilo
Browse files

Fix bug

parent 14bcb813
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ export default async (ctx: Koa.BaseContext) => {
const username = body['username'];
const password = body['password'];
const host = process.env.NODE_ENV === 'test' ? (body['host'] || null) : null;
const host: string | null = process.env.NODE_ENV === 'test' ? (body['host'] || null) : null;
const invitationCode = body['invitationCode'];
if (instance && instance.disableRegistration) {
......@@ -109,7 +109,7 @@ export default async (ctx: Koa.BaseContext) => {
createdAt: new Date(),
username: username,
usernameLower: username.toLowerCase(),
host: toPuny(host),
host: host ? toPuny(host) : null,
token: secret,
isAdmin: config.autoAdmin && usersCount === 0,
}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment