Compare commits
3 Commits
11.0.0-bet
...
11.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
cfee87d3ef | |||
5fcf5bc635 | |||
14bcb813cc |
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "11.0.0-beta.6",
|
"version": "11.0.0-beta.7",
|
||||||
"codename": "daybreak",
|
"codename": "daybreak",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -24,9 +24,14 @@ import { UserPublickey } from './models/entities/user-publickey';
|
|||||||
import { UserKeypair } from './models/entities/user-keypair';
|
import { UserKeypair } from './models/entities/user-keypair';
|
||||||
import { extractPublic } from './crypto_key';
|
import { extractPublic } from './crypto_key';
|
||||||
import { Emoji } from './models/entities/emoji';
|
import { Emoji } from './models/entities/emoji';
|
||||||
import { toPuny } from './misc/convert-host';
|
import { toPuny as _toPuny } from './misc/convert-host';
|
||||||
import { UserProfile } from './models/entities/user-profile';
|
import { UserProfile } from './models/entities/user-profile';
|
||||||
|
|
||||||
|
function toPuny(x: string | null): string | null {
|
||||||
|
if (x == null) return null;
|
||||||
|
return _toPuny(x);
|
||||||
|
}
|
||||||
|
|
||||||
const u = (config as any).mongodb.user ? encodeURIComponent((config as any).mongodb.user) : null;
|
const u = (config as any).mongodb.user ? encodeURIComponent((config as any).mongodb.user) : null;
|
||||||
const p = (config as any).mongodb.pass ? encodeURIComponent((config as any).mongodb.pass) : null;
|
const p = (config as any).mongodb.pass ? encodeURIComponent((config as any).mongodb.pass) : null;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ export default async (ctx: Koa.BaseContext) => {
|
|||||||
|
|
||||||
const username = body['username'];
|
const username = body['username'];
|
||||||
const password = body['password'];
|
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'];
|
const invitationCode = body['invitationCode'];
|
||||||
|
|
||||||
if (instance && instance.disableRegistration) {
|
if (instance && instance.disableRegistration) {
|
||||||
@ -109,7 +109,7 @@ export default async (ctx: Koa.BaseContext) => {
|
|||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
username: username,
|
username: username,
|
||||||
usernameLower: username.toLowerCase(),
|
usernameLower: username.toLowerCase(),
|
||||||
host: toPuny(host),
|
host: host ? toPuny(host) : null,
|
||||||
token: secret,
|
token: secret,
|
||||||
isAdmin: config.autoAdmin && usersCount === 0,
|
isAdmin: config.autoAdmin && usersCount === 0,
|
||||||
}));
|
}));
|
||||||
|
Reference in New Issue
Block a user