connexion avec back de 'admin/adList'
This commit is contained in:
parent
b617af0051
commit
fd722f613d
15 changed files with 112 additions and 50 deletions
|
|
@ -7,6 +7,7 @@ export interface User
|
|||
role: {
|
||||
name: string,
|
||||
permission: number,
|
||||
isAccepted: boolean,
|
||||
},
|
||||
profileImageUrl: string,
|
||||
dateOfBirth: Date,
|
||||
|
|
@ -14,7 +15,6 @@ export interface User
|
|||
interests: any[],
|
||||
company: string,
|
||||
isActive: boolean,
|
||||
isAccepted: boolean,
|
||||
lastConnexion: Date,
|
||||
createdAt: Date,
|
||||
updatedAt: Date
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ const USER: User = {
|
|||
role: {
|
||||
name: "user",
|
||||
permission: 0,
|
||||
isAccepted: true,
|
||||
|
||||
},
|
||||
profileImageUrl: "https://www.figurines-goodies.com/1185-thickbox_default/huey-duck-tales-disney-funko-pop.jpg",
|
||||
dateOfBirth: new Date(),
|
||||
|
|
@ -19,7 +21,6 @@ const USER: User = {
|
|||
interests: ["foot", "jeux-vidéo"],
|
||||
company: "",
|
||||
isActive: true,
|
||||
isAccepted: true,
|
||||
lastConnexion: new Date(),
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date()
|
||||
|
|
@ -33,6 +34,8 @@ const ADVERTISER: User = {
|
|||
role: {
|
||||
name: "advertiser",
|
||||
permission: 5,
|
||||
isAccepted: true,
|
||||
|
||||
},
|
||||
profileImageUrl: "https://www.figurines-goodies.com/1188-large_default/dewey-duck-tales-disney-funko-pop.jpg",
|
||||
dateOfBirth: null,
|
||||
|
|
@ -40,7 +43,6 @@ const ADVERTISER: User = {
|
|||
interests: [],
|
||||
company: "My company",
|
||||
isActive: true,
|
||||
isAccepted: true,
|
||||
lastConnexion: new Date(),
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
|
|
@ -54,6 +56,7 @@ const ADMIN: User = {
|
|||
role: {
|
||||
name: "admin",
|
||||
permission: 5,
|
||||
isAccepted: true,
|
||||
},
|
||||
profileImageUrl: "https://www.reference-gaming.com/assets/media/product/41195/figurine-pop-duck-tales-n-309-loulou.jpg?format=product-cover-large&k=1519639530",
|
||||
dateOfBirth: null,
|
||||
|
|
@ -61,7 +64,6 @@ const ADMIN: User = {
|
|||
interests: [],
|
||||
company: "",
|
||||
isActive: true,
|
||||
isAccepted: true,
|
||||
lastConnexion: new Date(),
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
|
|
@ -83,7 +85,7 @@ export class FictitiousUsersService
|
|||
res._id += this.fictitiousUtilsService.makeid(5);
|
||||
res.login += (Math.floor(Math.random() * 1000)).toString();
|
||||
res.email = res.login + "@gmail.com" ;
|
||||
res.isAccepted = (Math.random() < 0.5);
|
||||
res.role.isAccepted = (Math.random() < 0.5);
|
||||
res.isActive = (Math.random() < 0.5);
|
||||
res.dateOfBirth = this.fictitiousUtilsService.randomDate(new Date(1900, 0, 1), new Date());
|
||||
res.lastConnexion = this.fictitiousUtilsService.randomDate(new Date(2000, 0, 1), new Date());
|
||||
|
|
@ -122,4 +124,5 @@ export class FictitiousUsersService
|
|||
for(let i=0 ; i<n ; i++) res.push(this.getAdmin());
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue