fix customer model case
This commit is contained in:
@@ -24,14 +24,14 @@ function populateDatabase(model) {
|
|||||||
|
|
||||||
switch (model.toLowerCase()) {
|
switch (model.toLowerCase()) {
|
||||||
case 'customers':
|
case 'customers':
|
||||||
task = fetchCustomers(100)
|
task = fetchCustomers(37)
|
||||||
.then((customers) => {
|
.then((customers) => {
|
||||||
const tasks = customers.map((customer) => {
|
const tasks = customers.map((customer) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const options = {
|
const options = {
|
||||||
host,
|
host,
|
||||||
port,
|
port,
|
||||||
path: '/api/Customers',
|
path: '/api/customers',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "Customer",
|
"name": "customer",
|
||||||
"base": "PersistedModel",
|
"base": "PersistedModel",
|
||||||
"idInjection": true,
|
"idInjection": true,
|
||||||
"options": {
|
"options": {
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"length": 64,
|
"length": 64,
|
||||||
"precision": null,
|
"precision": null,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"ACL": 1,
|
"ACL": 1,
|
||||||
"RoleMapping": 1,
|
"RoleMapping": 1,
|
||||||
"Role": 1,
|
"Role": 1,
|
||||||
"Customer": 1
|
"customer": 1
|
||||||
},
|
},
|
||||||
"models": {
|
"models": {
|
||||||
"User": {},
|
"User": {},
|
||||||
@@ -13,6 +13,6 @@
|
|||||||
"ACL": {},
|
"ACL": {},
|
||||||
"RoleMapping": {},
|
"RoleMapping": {},
|
||||||
"Role": {},
|
"Role": {},
|
||||||
"Customer": {}
|
"customer": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"dataSource": "db",
|
"dataSource": "db",
|
||||||
"public": false
|
"public": false
|
||||||
},
|
},
|
||||||
"Customer": {
|
"customer": {
|
||||||
"dataSource": "db",
|
"dataSource": "db",
|
||||||
"public": true
|
"public": true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user