Browse Source

More

master
Gustavo Adolfo Mesa Roldán 5 years ago
parent
commit
3b65779433
6 changed files with 302 additions and 262 deletions
  1. +41
    -33
      familyark/app/public/js/buttons.js
  2. +81
    -52
      familyark/app/public/js/functions.js
  3. +133
    -151
      familyark/app/public/templates/animal-form.html
  4. +1
    -1
      familyark/app/public/templates/animal-show.html
  5. +3
    -6
      familyark/app/public/templates/home.html
  6. +43
    -19
      familyark/app/server.js

+ 41
- 33
familyark/app/public/js/buttons.js View File

@ -2,51 +2,59 @@ $('document').ready(function(){
$( "#body" ).load( "/templates/home.html" );
// Botones
$("#home").click(function(){
$( "#body" ).load( "/templates/home.html" );
});
$("#home").click(function(){
$( "#body" ).load( "/templates/home.html" );
});
$("#animals").click(function(){
$.get( "/animal", function( data ) {
$( "#body" ).html("<h1>Yours Dinos</h1><button id='animal-add' class='btn btn-success btn-sm float-right'>+ New Dino</button><br><br><table id='animals-table'></table>");
$( "#animal-add").click(function(){
$( "#body" ).load( "/templates/animal-form.html" );
})
dataSet = data.data.map(function(item) {
return [item._id, item.name, item.initial_level + " - " + item.level];
$.get( "/species", function( species_r ) {
var species = {};
species_r.data.map(function(item) {
species[item._id] = item.name
});
$( "#body" ).html("<h1>Yours Dinos</h1><button id='animal-add' class='btn btn-success btn-sm float-right'>+ New Dino</button><br><br><table id='animals-table'></table>");
$( "#animal-add").click(function(){
$( "#body" ).load( "/templates/animal-form.html" );
})
dataSet = data.data.map(function(item) {
return [item._id, item.name, item.initial_level + " - " + item.level, species[item.specie]];
});
$('#animals-table').DataTable({
data: dataSet,
responsive: true,
columns: [
{ title: "id", visible: false},
{ title: "Name" },
{ title: "Level" },
{ title: "Specie" },
{ title: "Options", className: "options-table", orderable: false,data: null, targets: -1, "mRender": function(data, type, full) {
return '<button class="btn btn-primary btn-sm" onclick="showAnimal(\''+ full[0] +'\')">Show</button>&nbsp;&nbsp;<button class="btn btn-info btn-sm" onclick="editAnimal(\''+ full[0] +'\')">Edit</button>&nbsp;&nbsp;<button class="btn btn-danger btn-sm" onclick="removeAnimal(\''+full[0]+'\')">Remove</button>';
}}
]});
});
$('#animals-table').DataTable({
data: dataSet,
responsive: true,
columns: [
{ title: "id", visible: false},
{ title: "Name" },
{ title: "Level" },
{ title: "Options", className: "options-table", orderable: false,data: null, targets: -1, "mRender": function(data, type, full) {
return '<button class="btn btn-primary btn-sm" onclick="showAnimal(\''+ full[0] +'\')">Show</button>&nbsp;&nbsp;<button class="btn btn-info btn-sm" onclick="editAnimal(\''+ full[0] +'\')">Edit</button>&nbsp;&nbsp;<button class="btn btn-danger btn-sm" onclick="removeAnimal(\''+full[0]+'\')">Remove</button>';
}}
]});
});
});
$("#species").click(function(){
$.get( "/species", function( data ) {
$("#species").click(function(){
$.get( "/species", function( data ) {
$( "#body" ).html("<h1>All Species</h1><table id='species-table'></table>");
dataSet = data.data.map(function(item) {
dataSet = data.data.map(function(item) {
return [item.name, item.description];
});
$('#species-table').DataTable({
data: dataSet,
data: dataSet,
responsive: true,
columns: [
{ title: "Name" },
{ title: "Description" },
{ title: "Options", className: "options-table-species", orderable: false,data: null, targets: -1, "mRender": function(data, type, full) {
return '<button class="btn btn-primary btn-sm" onclick="alert(\'En desarollo\')">Show</button>'
}}
]
columns: [
{ title: "Name" },
{ title: "Description" },
{ title: "Options", className: "options-table-species", orderable: false,data: null, targets: -1, "mRender": function(data, type, full) {
return '<button class="btn btn-primary btn-sm" onclick="alert(\'En desarollo\')">Show</button>'
}}
]
});
});
});
});
});
$("#about").click(function(){
$( "#body" ).load( "/templates/about.html" );


+ 81
- 52
familyark/app/public/js/functions.js View File

@ -2,27 +2,27 @@
//Funtions
function onSubmitAnimal(form){
var data = {};
var data = {};
$.map($(form).serializeArray(), function(n, i){
if(n['value']!= "") data[n['name']] = n['value'];
else data[n['name']] = null;
});
if(data._id){
$.ajax({
type: "PUT",
url: "/animal/"+data._id,
data: JSON.stringify(data),
success: function() { $("#animals").click() },
contentType : "application/json"
});
$.ajax({
type: "PUT",
url: "/animal/"+data._id,
data: JSON.stringify(data),
success: function() { $("#animals").click() },
contentType : "application/json"
});
}else{
$.ajax({
type: "POST",
url: "/animal",
data: JSON.stringify(data),
success: function() { $("#animals").click() },
contentType : "application/json"
type: "POST",
url: "/animal",
data: JSON.stringify(data),
success: function() { $("#animals").click() },
contentType : "application/json"
});
}
return false;
@ -30,61 +30,58 @@ function onSubmitAnimal(form){
function editAnimal(id){
$( "#body" ).load( "/templates/animal-form.html", function(){
var animal;
$.get( "/animal/"+id, function( data ) {
for(key in data.data[0])
animal = data.data
for(key in animal)
{
if(data.data[0].hasOwnProperty(key)){
if(animal.hasOwnProperty(key)){
if(key == "father" || key == "mother" || key == "specie" || key == "sex"){
let a = key;
setTimeout(function(){
$('#a-'+a+' option[value='+data.data[0][a]+']').attr('selected','selected');
console.log(data.data[0][a]);
console.log(a);
$('#a-'+a+' option[value='+data.data[0][a]+']').attr('selected','selected');
}, 200)
}else{
$('input[name='+key+']').val( data.data[0][key].$numberDecimal ? data.data[0][key].$numberDecimal : data.data[0][key]);
}else{
$('input[name='+key+']').val( data.data[0][key] ? data.data[0][key].$numberDecimal ? data.data[0][key].$numberDecimal : data.data[0][key] : "");
}
}
}
});
$.get( "/species", function( data ) {
data.data.map(function(item){
$("#a-specie").append("<option value='"+item._id+"'>"+item.name+"</option>");
})
});
paint_male_female(animal.specie, animal._id);
$("#a-specie").change(function(e){
paint_male_female($( this ).val(), animal._id);
})
});
});
}
function showAnimal(id){
$( "#body" ).load( "/templates/animal-show.html", function(){
/* $.get( "/animal/"+id, function( data ) {
$.get( "/animal", function( animalsData ) {
$.each(data.data[0], function(i, val) {
$("#data").append( "<div>"+i+": "+(val.$numberDecimal ? val.$numberDecimal : val)+"</div>");
});
var text = "<table><tr>";
$.get( "/animal/"+ id, function( data ) {
var animal = data.data,
j = 1;
$.each(animal, function(i, val) {
text += "<td>"+i+"</td><td>"+(val ? val.$numberDecimal ? val.$numberDecimal : val : "")+"</td>";
if(j % 3 == 0) text += "</tr><tr>"
j++;
});
});*/
$.get('/animal/tree/' + id, function(data) {
var chart_config = [{
container: "#tree",
connectors: {
type: 'step'
}
},
{
text: {
name: data[0].name
},
//parent: data[0].ancestorsmother.filter(ancestor => ancestor.depth === 0),
//parent: data[0].ancestorsfather.filter(ancestor => ancestor.depth === 0),
//children: data[0].childrensmother.filter(ancestor => ancestor.depth === 0),
//children: data[0].childrensfather.filter(ancestor => ancestor.depth === 0)
},
{
text: {
name: "test"
},
parent: data[0].ancestors.filter(ancestor => ancestor.depth === 0)
}]
})
text += "</tr></table>";
$("#a-name").html( );
$("#data").append( text );
// console.log(11)
get_parrents(animal);
// console.log(22)
get_childrens(animal);
// console.log(33)
});
});
}
@ -97,3 +94,35 @@ function removeAnimal(id){
});
}
}
function paint_male_female(specie, id){
$(".option").remove();
$.get( "/animal/"+specie+"/Male", function( data ) {
data.data.map(function(item){
if(item._id != id) $("#a-father").append("<option class=\"option\" value='"+item._id+"'>"+item.name+" - "+ item.level +"</option>");
})
});
$.get( "/animal/"+specie+"/Female", function( data ) {
data.data.map(function(item){
if(item._id != id) $("#a-mother").append("<option class=\"option\" value='"+item._id+"'>"+item.name+" - "+ item.level +"</option>");
})
});
}
function get_parrents(animal){
$.get( "/animal/parrents/" + animal._id, function( data ) {
data.data.map(function(item){
console.log(item);
});
});
}
function get_childrens(animal){
$.get( "/animal/childrens/" + animal._id, function( data ) {
data.data.map(function(item){
console.log(item)
})
});
}

+ 133
- 151
familyark/app/public/templates/animal-form.html View File

@ -1,155 +1,137 @@
<form id="animal-form" onsubmit="return onSubmitAnimal(this)">
<h5>Identication</h5>
<div class="row">
<input type="hidden" class="form-control" name="_id" id="id">
<div class="form-group col-4">
<label for="a-UUID">UUID</label>
<input type="text" class="form-control" name="uuid" id="a-UUID" placeholder="UUID">
</div>
<div class="form-group col-3">
<label for="a-name">Name</label>
<input type="text" class="form-control" name="name" id="a-name" placeholder="Name" required>
</div>
<div class="form-group col-2">
<label for="a-initial_level">Initial Level</label>
<input type="number" class="form-control" name="initial_level" id="a-initial_level" placeholder="Initial Level" required>
</div>
<div class="form-group col-2">
<label for="a-level">Level</label>
<input type="number" class="form-control" name="level" id="a-level" placeholder="Level" required>
</div>
<div class="form-group col-3">
<label for="a-specie">Specie</label>
<select class="form-control" name="specie" id="a-specie" placeholder="specie" required><option value="">Select one</option></select>
</div>
<div class="form-group col-2">
<label for="a-sex">Sex</label>
<select class="form-control" name="sex" id="a-sex" placeholder="sex" required><option value="">Select one</option> <option value="Male">Male</option> <option value="Female">Female</option></select>
</div>
</div>
<h5>Initial attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-initial_health">Initial Health</label>
<input type="number" step="any" class="form-control" name="initial_health" id="a-inital_health" placeholder="Initial Health">
</div>
<div class="form-group col-2">
<label for="a-initial_energy">Initial Energy</label>
<input type="number" step="any" class="form-control" name="initial_energy" id="a-initial_energy" placeholder="Initial Energy">
</div>
<div class="form-group col-2">
<label for="a-initial_food">Initial Food</label>
<input type="number" step="any" class="form-control" name="initial_food" id="a-initial_food" placeholder="Initial Food">
</div>
<div class="form-group col-2">
<label for="a-initial_damage">Initial Damage</label>
<input type="number" step="any" class="form-control" name="initial_damage" id="a-initial_damage" placeholder="Initial Damage">
</div>
<div class="form-group col-2">
<label for="a-initial_velocity">Initial Velocity</label>
<input type="number" step="any" class="form-control" name="initial_velocity" id="a-initial_velocity" placeholder="Initial Velocity">
</div>
</div>
<h5>Actuality attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-health">Health</label>
<input type="number" step="any" class="form-control" name="health" id="a-health" placeholder="Health">
</div>
<div class="form-group col-2">
<label for="a-energy">Energy</label>
<input type="number" step="any" class="form-control" name="energy" id="a-energy" placeholder="Energy">
<h5>Identication</h5>
<div class="row">
<input type="hidden" class="form-control" name="_id" id="id">
<div class="form-group col-4">
<label for="a-UUID">UUID</label>
<input type="text" class="form-control" name="uuid" id="a-UUID" placeholder="UUID">
</div>
<div class="form-group col-3">
<label for="a-name">Name</label>
<input type="text" class="form-control" name="name" id="a-name" placeholder="Name" required>
</div>
<div class="form-group col-2">
<label for="a-initial_level">Initial Level</label>
<input type="number" class="form-control" name="initial_level" id="a-initial_level" placeholder="Initial Level" required>
</div>
<div class="form-group col-2">
<label for="a-level">Level</label>
<input type="number" class="form-control" name="level" id="a-level" placeholder="Level" required>
</div>
<div class="form-group col-3">
<label for="a-specie">Specie</label>
<select class="form-control" name="specie" id="a-specie" placeholder="specie" required><option value="">Select one</option></select>
</div>
<div class="form-group col-2">
<label for="a-sex">Sex</label>
<select class="form-control" name="sex" id="a-sex" placeholder="sex" required><option value="">Select one</option> <option value="Male">Male</option> <option value="Female">Female</option></select>
</div>
</div>
<h5>Initial attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-initial_health">Initial Health</label>
<input type="number" step="any" class="form-control" name="initial_health" id="a-inital_health" placeholder="Initial Health">
</div>
<div class="form-group col-2">
<label for="a-initial_energy">Initial Energy</label>
<input type="number" step="any" class="form-control" name="initial_energy" id="a-initial_energy" placeholder="Initial Energy">
</div>
<div class="form-group col-2">
<label for="a-initial_food">Initial Food</label>
<input type="number" step="any" class="form-control" name="initial_food" id="a-initial_food" placeholder="Initial Food">
</div>
<div class="form-group col-2">
<label for="a-initial_damage">Initial Damage</label>
<input type="number" step="any" class="form-control" name="initial_damage" id="a-initial_damage" placeholder="Initial Damage">
</div>
<div class="form-group col-2">
<label for="a-initial_velocity">Initial Velocity</label>
<input type="number" step="any" class="form-control" name="initial_velocity" id="a-initial_velocity" placeholder="Initial Velocity">
</div>
</div>
<h5>Actuality attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-health">Health</label>
<input type="number" step="any" class="form-control" name="health" id="a-health" placeholder="Health">
</div>
<div class="form-group col-2">
<label for="a-energy">Energy</label>
<input type="number" step="any" class="form-control" name="energy" id="a-energy" placeholder="Energy">
</div>
<div class="form-group col-2">
<label for="a-food">Food</label>
<input type="number" step="any" class="form-control" name="food" id="a-food" placeholder="Food">
</div>
<div class="form-group col-2">
<label for="a-damage">Damage</label>
<input type="number" step="any" class="form-control" name="damage" id="a-damage" placeholder="Damage">
</div>
<div class="form-group col-2">
<label for="a-velocity">Velocity</label>
<input type="number" step="any" class="form-control" name="velocity" id="a-velocity" placeholder="Velocity">
</div>
</div>
<h5>Parenting attributes</h5>
<div class="row">
<div class="form-group col-3">
<label for="a-father">Father</label>
<select class="form-control" name="father" id="a-father" placeholder="Father"><option value="">None..</option></select>
</div>
<div class="form-group col-3">
<label for="a-mother">Mother</label>
<select class="form-control" name="mother" id="a-mother" placeholder="Mother"><option value="">None..</option></select>
</div>
<div class="form-group col-2">
<label for="a-inconsistency">Inconsistency</label>
<input type="number" step="any" class="form-control" name="inconsistency" id="a-inconsistency" placeholder="Inconsistency">
</div>
<div class="form-group col-2">
<label for="a-imprint">Imprint</label>
<input type="number" step="any" class="form-control" name="imprint" id="a-imprint" placeholder="Imprint">
</div>
<div class="form-group col-2">
<label for="a-mutations">Mutations</label>
<input type="number" class="form-control" name="mutations" id="a-mutations" placeholder="Mutations">
</div>
</div>
<h5>Clan attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-server">Server</label>
<input type="text" class="form-control" name="server" id="a-server" placeholder="Server">
</div>
<div class="form-group col-2">
<label for="a-base">Base</label>
<input type="text" class="form-control" name="base" id="a-base" placeholder="Base">
</div>
<div class="form-group col-2">
<label for="a-breeder">Breeder</label>
<input type="text" class="form-control" name="breeder" id="a-breeder" placeholder="Breeder">
</div>
</div>
<div class="form-group col-2">
<label for="a-food">Food</label>
<input type="number" step="any" class="form-control" name="food" id="a-food" placeholder="Food">
</div>
<div class="form-group col-2">
<label for="a-damage">Damage</label>
<input type="number" step="any" class="form-control" name="damage" id="a-damage" placeholder="Damage">
</div>
<div class="form-group col-2">
<label for="a-velocity">Velocity</label>
<input type="number" step="any" class="form-control" name="velocity" id="a-velocity" placeholder="Velocity">
</div>
</div>
<h5>Parenting attributes</h5>
<div class="row">
<div class="form-group col-3">
<label for="a-father">Father</label>
<select class="form-control" name="father" id="a-father" placeholder="Father"><option value="">None..</option></select>
</div>
<div class="form-group col-3">
<label for="a-mother">Mother</label>
<select class="form-control" name="mother" id="a-mother" placeholder="Mother"><option value="">None..</option></select>
</div>
<div class="form-group col-2">
<label for="a-inconsistency">Inconsistency</label>
<input type="number" step="any" class="form-control" name="inconsistency" id="a-inconsistency" placeholder="Inconsistency">
</div>
<div class="form-group col-2">
<label for="a-imprint">Imprint</label>
<input type="number" step="any" class="form-control" name="imprint" id="a-imprint" placeholder="Imprint">
</div>
<div class="form-group col-2">
<label for="a-mutations">Mutations</label>
<input type="number" class="form-control" name="mutations" id="a-mutations" placeholder="Mutations">
</div>
</div>
<h5>Clan attributes</h5>
<div class="row">
<div class="form-group col-2">
<label for="a-server">Server</label>
<input type="text" class="form-control" name="server" id="a-server" placeholder="Server">
</div>
<div class="form-group col-2">
<label for="a-base">Base</label>
<input type="text" class="form-control" name="base" id="a-base" placeholder="Base">
</div>
<div class="form-group col-2">
<label for="a-breeder">Breeder</label>
<input type="text" class="form-control" name="breeder" id="a-breeder" placeholder="Breeder">
</div>
</div>
<button id="animal-add-button" type="submit" class="btn btn-primary float-right">Submit</button>
</form>
<script>
$('document').ready(function(){
$.get( "/animal", function( data ) {
data.data.map(function(item){
$("#a-father, #a-mother").append("<option value='"+item._id+"'>"+item.name+" - "+ item.level +"</option>");
})
});
$.get( "/species", function( data ) {
data.data.map(function(item){
$("#a-specie").append("<option value='"+item._id+"'>"+item.name+"</option>");
})
});
});
</script>

+ 1
- 1
familyark/app/public/templates/animal-show.html View File

@ -1,6 +1,6 @@
<h1 class="a-name">Un dino</h1>
<div class="row">
<div id="data" class="col-6"></div>
<div id="data" class="col-12"></div>
<div id="tree" class="col-6"></div>
<div id="chart" class="col-12"><h5>Aqui vendran graficas de cada atributo con el inicial y el actual, para que se pueda ver el crecimiento.</h5></div>
</div>

+ 3
- 6
familyark/app/public/templates/home.html View File

@ -2,10 +2,7 @@
<div class="text-center">
<h4>Your app for your dinos.</h4>
<h4>Inventory, breeding and family.</h4>
<br><br><br>
<br/><br/><br/>
<h2>Oficial Servers Mutiplier Status</h1>
<div id="info">
</div>
</div>
<div id="info"></div>
</div>

+ 43
- 19
familyark/app/server.js View File

@ -24,7 +24,7 @@ http.createServer(app)
router.get('/species', (req, res, next) => {
species.find({}, (err, result) => {
if (err) next(err)
else res.json({ data: result, status: 'ok' })
else res.json({ data: result, status: 'ok' })
})
})
@ -35,13 +35,36 @@ router.get('/animal', (req, res, next) => {
})
})
router.get('/animal/childrens/:id', (req, res, next) => {
animal.find({ $or: [ { father: req.params.id }, { mother: req.params.id } ] }, (err, result) => {
if (err) next(err)
else res.json({ data: result, status: 'ok' })
})
})
router.get('/animal/parrents/:id', (req, res, next) => {
animal.find({ _id: req.params.id }, (err, result) => {
if (err) next(err)
else animal.find({ $or: [ { _id: result[0].father }, { _id: result[0].mother } ] }, (err, result2) => {
if (err) next(err)
else res.json({ data: result2, status: 'ok' })
})
})
})
router.get('/animal/:id', (req, res, next) => {
animal.find({ _id: mongoose.Types.ObjectId(req.params.id) }, (err, result) => {
if (err) next(err)
else res.json({ data: result, status: 'ok' })
else res.json({ data: result[0], status: 'ok' })
})
})
router.get('/animal/:specie/:sex', (req, res, next) => {
animal.find({ specie: req.params.specie, sex: req.params.sex}, (err, result) => {
if (err) next(err)
else res.json({ data: result, status: 'ok' })
})
})
router.post('/animal', (req, res, next) => {
let s1 = new animal(req.body)
@ -76,6 +99,7 @@ router.get('/info', (req, res, next) => {
res.json(acc)
});
})
/*function recu(acc,item){
if(item.mather != null){
animal.find({ _id: mongoose.Types.ObjectId(item.mother) }, (err, result) => {
@ -86,23 +110,23 @@ router.get('/info', (req, res, next) => {
};
*/
router.get('/animal/tree/:id', (req, res, next) => {
/* animal.find({ _id: mongoose.Types.ObjectId(req.params.id) }, (err, result) => {
if (err) next(err)
else res.json(recu([],result[0]))
})
*/
animal.aggregate([{ $match: { _id: mongoose.Types.ObjectId(req.params.id) }},
{ $graphLookup: { from: 'animals', startWith: ['$father', '$mother'], connectFromField: 'mother', connectToField: '_id', as: 'ancestorsmother', maxDepth: 99, depthField: 'depth' }},
{ $graphLookup: { from: 'animals', startWith: ['$father', '$mother'], connectFromField: 'father', connectToField: '_id', as: 'ancestorsfather', maxDepth: 99, depthField: 'depth' }},
{ $graphLookup: { from: 'animals', startWith: '$_id', connectFromField: '_id', connectToField: 'mother', as: 'childrensmother', maxDepth: 99, depthField: 'depth' }},
{ $graphLookup: { from: 'animals', startWith: '$_id', connectFromField: '_id', connectToField: 'father', as: 'childrensfather', maxDepth: 99, depthField: 'depth' }},
{ $project: { 'name': 1, 'sex': 1, 'father': 1, 'mother': 1, ancestors: { $setUnion: ['$ancestorsmother', '$ancestorsfather'] }, childrens: { $setUnion: ['$childrensmother', '$childrensfather'] }}
}]).allowDiskUse(true).exec((err, connections) => {
if (err) next(err)
else res.json(connections)
})
})
// router.get('/animal/tree/:id', (req, res, next) => {
// /* animal.find({ _id: mongoose.Types.ObjectId(req.params.id) }, (err, result) => {
// if (err) next(err)
// else res.json(recu([],result[0]))
// })
// */
// animal.aggregate([{ $match: { _id: mongoose.Types.ObjectId(req.params.id) }},
// { $graphLookup: { from: 'animals', startWith: ['$father', '$mother'], connectFromField: 'mother', connectToField: '_id', as: 'ancestorsmother', maxDepth: 99, depthField: 'depth' }},
// { $graphLookup: { from: 'animals', startWith: ['$father', '$mother'], connectFromField: 'father', connectToField: '_id', as: 'ancestorsfather', maxDepth: 99, depthField: 'depth' }},
// { $graphLookup: { from: 'animals', startWith: '$_id', connectFromField: '_id', connectToField: 'mother', as: 'childrensmother', maxDepth: 99, depthField: 'depth' }},
// { $graphLookup: { from: 'animals', startWith: '$_id', connectFromField: '_id', connectToField: 'father', as: 'childrensfather', maxDepth: 99, depthField: 'depth' }},
// { $project: { 'name': 1, 'sex': 1, 'father': 1, 'mother': 1, ancestors: { $setUnion: ['$ancestorsmother', '$ancestorsfather'] }, childrens: { $setUnion: ['$childrensmother', '$childrensfather'] }}
// }]).allowDiskUse(true).exec((err, connections) => {
// if (err) next(err)
// else res.json(connections)
// })
// })
app.use(bodyParser.urlencoded({
extended: true


Loading…
Cancel
Save