fix user constructor issue

This commit is contained in:
Steven Zou 2017-03-30 13:40:36 +08:00
parent ad79cb9e29
commit 03aa346efc
2 changed files with 2 additions and 5 deletions

View File

@ -130,7 +130,8 @@ export class UserComponent implements OnInit, OnDestroy {
} }
//Value copy //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) { if (user.has_admin_role === 0) {
updatedUser.has_admin_role = 1;//Set as admin updatedUser.has_admin_role = 1;//Set as admin

View File

@ -5,10 +5,6 @@
* @class User * @class User
*/ */
export class User { export class User {
constructor(userId: number){
this.user_id = userId;
}
user_id: number; user_id: number;
username?: string; username?: string;
realname?: string; realname?: string;