This commit is contained in:
syuilo
2017-10-07 07:23:00 +09:00
parent fe98dd927d
commit 91251916ce
2 changed files with 10 additions and 3 deletions

View File

@@ -73,3 +73,10 @@ export type IUser = {
is_suspended: boolean;
keywords: string[];
};
export function init(user): IUser {
user._id = new mongo.ObjectID(user._id);
user.avatar_id = new mongo.ObjectID(user.avatar_id);
user.banner_id = new mongo.ObjectID(user.banner_id);
user.pinned_post_id = new mongo.ObjectID(user.pinned_post_id);
}