Made some changes to the mock-api
This commit is contained in:
@@ -38,7 +38,7 @@ function generateDeltagare(amount = 10) {
|
||||
const fornamn = faker.name.firstName();
|
||||
const efternamn = faker.name.lastName();
|
||||
|
||||
const korkort = Math.random() > 0.8 && {
|
||||
const korkort = Math.random() > 0.2 && {
|
||||
behorighet: chooseRandom(DRIVERS_LICENSES, faker.datatype.number(3)).join(''),
|
||||
};
|
||||
const educationLevel = EDUCATION_LEVELS[Math.floor(Math.random() * EDUCATION_LEVELS.length)];
|
||||
@@ -90,7 +90,7 @@ function generateDeltagare(amount = 10) {
|
||||
sun_kod: sunKod.sun_kod,
|
||||
beskrivning_sun_kod: sunKod.beskrivning,
|
||||
},
|
||||
education: {
|
||||
educations: {
|
||||
utbildningar: chooseRandom(EDUCATIONS, faker.datatype.number(EDUCATIONS.length)),
|
||||
},
|
||||
translator: {
|
||||
|
||||
@@ -68,12 +68,6 @@ generatedAvrop.forEach(({ tjanstekod, tjansteNamn, utforandeVerksamhetId, utfora
|
||||
}
|
||||
});
|
||||
|
||||
generatedEmployees.forEach(employee => {
|
||||
employee.authorizations = [
|
||||
auths[Math.floor(Math.random() * auths.length)],
|
||||
auths[Math.floor(Math.random() * auths.length)],
|
||||
];
|
||||
});
|
||||
const apiData = {
|
||||
languages: languages.generate(),
|
||||
employees: generatedEmployees,
|
||||
@@ -87,7 +81,6 @@ const apiData = {
|
||||
employeeId: generatedEmployees[Math.floor(Math.random() * generatedEmployees.length)].id,
|
||||
})),
|
||||
currentUser: currentUser.generate(),
|
||||
authorizations: auths,
|
||||
getTokenFullAccess: authTokens.auth_code_from_CIAM_with_all_permissions,
|
||||
invites: [],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user