From 03aa346efc7f092a682add0dca152b50912c0b6d Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Thu, 30 Mar 2017 13:40:36 +0800 Subject: [PATCH] fix user constructor issue --- src/ui_ng/src/app/user/user.component.ts | 3 ++- src/ui_ng/src/app/user/user.ts | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ui_ng/src/app/user/user.component.ts b/src/ui_ng/src/app/user/user.component.ts index 66956b73f..c6206aa69 100644 --- a/src/ui_ng/src/app/user/user.component.ts +++ b/src/ui_ng/src/app/user/user.component.ts @@ -130,7 +130,8 @@ export class UserComponent implements OnInit, OnDestroy { } //Value copy - let updatedUser: User = new User(user.user_id);; + let updatedUser: User = new User(); + updatedUser.user_id = user.user_id; if (user.has_admin_role === 0) { updatedUser.has_admin_role = 1;//Set as admin diff --git a/src/ui_ng/src/app/user/user.ts b/src/ui_ng/src/app/user/user.ts index 96095c682..e58688199 100644 --- a/src/ui_ng/src/app/user/user.ts +++ b/src/ui_ng/src/app/user/user.ts @@ -5,10 +5,6 @@ * @class User */ export class User { - constructor(userId: number){ - this.user_id = userId; - } - user_id: number; username?: string; realname?: string;