This commit is contained in:
syuilo 2018-03-28 16:20:46 +09:00
parent efb7c71d88
commit 7d4d9dbaa6
3 changed files with 34 additions and 3 deletions

View File

@ -46,7 +46,7 @@ export type ILocalAccount = {
password: string; password: string;
token: string; token: string;
twitter: { twitter: {
access_token: string; accessToken: string;
access_token_secret: string; access_token_secret: string;
user_id: string; user_id: string;
screen_name: string; screen_name: string;

View File

@ -115,8 +115,6 @@ export default async (req: express.Request, res: express.Response) => {
following_count: 0, following_count: 0,
name: name, name: name,
posts_count: 0, posts_count: 0,
likes_count: 0,
liked_count: 0,
drive_capacity: 1073741824, // 1GB drive_capacity: 1073741824, // 1GB
username: username, username: username,
username_lower: username.toLowerCase(), username_lower: username.toLowerCase(),

View File

@ -194,3 +194,36 @@ db.swSubscriptions.update({}, {
user_id: 'userId', user_id: 'userId',
} }
}, false, true); }, false, true);
db.users.update({}, {
$rename: {
created_at: 'createdAt',
deleted_at: 'deletedAt',
followers_count: 'followersCount',
following_count: 'followingCount',
posts_count: 'postsCount',
drive_capacity: 'driveCapacity',
username_lower: 'usernameLower',
avatar_id: 'avatarId',
banner_id: 'bannerId',
pinned_post_id: 'pinnedPostId',
is_suspended: 'isSuspended',
host_lower: 'hostLower',
'twitter.access_token': 'twitter.accessToken',
'twitter.access_token_secret': 'twitter.accessTokenSecret',
'twitter.user_id': 'twitter.userId',
'twitter.screen_name': 'twitter.screenName',
'line.user_id': 'line.userId',
last_used_at: 'lastUsedAt',
is_bot: 'isBot',
is_pro: 'isPro',
two_factor_secret: 'twoFactorSecret',
two_factor_enabled: 'twoFactorEnabled',
client_settings: 'clientSettings'
},
$unset: {
likes_count: '',
liked_count: '',
latest_post: ''
}
}, false, true);