FIX: constructeur User

stub-api
Alban GUILHOT 3 years ago
parent c15b6f93fc
commit b4d1d70dd3

@ -19,22 +19,22 @@ export class User{
/* Consturctor of the class */ /* Consturctor of the class */
constructor(id: string, username: string, password:string, nationality: string, sexe: string, dateOfBirth: Date, currentCoins: number, totalCoins: number, constructor(id: string, username: string, password:string, nationality: string, sexe: string, dateOfBirth: Date, currentCoins: number, totalCoins: number,
nbGamePlayed:number, currentSkin: Skin, tabSkin: Skin[], tabConv?: Conversation[] ){ nbGamePlayed:number, currentSkin: Skin, tabSkin: Skin[], tabConv?: Conversation[] ){
this.Id=id; this.id=id;
this.Username=username; this.username=username;
this.Password=password; this.password=password;
this.Nationality=nationality; this.nationality=nationality;
this.Sexe=sexe; this.sexe=sexe;
this.DateOfBirth=dateOfBirth; this.dateOfBirth=dateOfBirth;
this.NbGamePlayed=nbGamePlayed; this.nbGamePlayed=nbGamePlayed;
this.CurrentCoins=currentCoins; this.currentCoins=currentCoins;
this.TotalCoins=totalCoins; this.totalCoins=totalCoins;
this.CurrentSkin=currentSkin; this.currentSkin=currentSkin;
this.TabSkin=[...tabSkin]; this.tabSkin=[...tabSkin];
if(tabConv!==undefined){ if(tabConv!==undefined){
this.TabConv=[...tabConv]; this.tabConv=[...tabConv];
} }
else{ else{
this.TabConv=tabConv; this.tabConv=tabConv;
} }
} }

Loading…
Cancel
Save