Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var write = (orgId = "0000000", c = 100) => {
- var doc = {
- "organization": "bi-standortmanager-organization_" + orgId,
- "unit": "000",
- "name": "Test000",
- "description": "Description of Test000",
- "zipcode": "",
- "zipname": "",
- "additional": "",
- "state": true
- };
- for(var i = 0; i < c; i++) {
- var str = i.toString().padStart(3, "0");
- doc.unit = str;
- doc.name = "Test" + str;
- doc.description = "Description of Test" + str;
- fetch("bi_standortmanager?bi_action=create&bi_tag=units&bi_storetype=managed", {
- method: "POST",
- body: JSON.stringify(doc)
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement