Merge branch 'master' of https://github.com/syuilo/misskey
This commit is contained in:
commit
27183b2142
16 changed files with 325 additions and 1 deletions
|
|
@ -59,6 +59,7 @@ export type IUser = {
|
|||
is_suspended: boolean;
|
||||
keywords: string[];
|
||||
account: {
|
||||
keypair: string;
|
||||
email: string;
|
||||
links: string[];
|
||||
password: string;
|
||||
|
|
@ -160,6 +161,7 @@ export const pack = (
|
|||
delete _user.latest_post;
|
||||
|
||||
// Remove private properties
|
||||
delete _user.account.keypair;
|
||||
delete _user.account.password;
|
||||
delete _user.account.token;
|
||||
delete _user.account.two_factor_temp_secret;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import * as uuid from 'uuid';
|
||||
import * as express from 'express';
|
||||
import * as bcrypt from 'bcryptjs';
|
||||
import { generate as generateKeypair } from '../../crypto_key';
|
||||
import recaptcha = require('recaptcha-promise');
|
||||
import User, { IUser, validateUsername, validatePassword, pack } from '../models/user';
|
||||
import generateUserToken from '../common/generate-native-user-token';
|
||||
|
|
@ -119,6 +120,7 @@ export default async (req: express.Request, res: express.Response) => {
|
|||
username: username,
|
||||
username_lower: username.toLowerCase(),
|
||||
account: {
|
||||
keypair: generateKeypair(),
|
||||
token: secret,
|
||||
email: null,
|
||||
links: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue