Added more staff data
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import fs from 'fs';
|
||||
import agencies from './agencies.js';
|
||||
import kommuner from './kommuner.js';
|
||||
import participants from './participants.js';
|
||||
import services from './services.js';
|
||||
import staff from './staff.js';
|
||||
|
||||
const generatedStaff = staff.generate(20);
|
||||
|
||||
const apiData = {
|
||||
participants: participants.generate(50),
|
||||
services: services.generate(),
|
||||
staff: staff.generate(50),
|
||||
staff: generatedStaff,
|
||||
kommuner: kommuner.generate(),
|
||||
agencies: agencies.generate(),
|
||||
participants: participants.generate(50).map(participant => ({
|
||||
...participant,
|
||||
staffId: generatedStaff[Math.floor(Math.random() * generatedStaff.length)].id,
|
||||
})),
|
||||
};
|
||||
|
||||
fs.writeFileSync('api.json', JSON.stringify(apiData, null, '\t'));
|
||||
|
||||
Reference in New Issue
Block a user