-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.js
37 lines (33 loc) · 1.09 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var mongoose = require('mongoose');
mongoose.connect('mongodb://beesmarter:[email protected]:39261/beesmarterdb');
// var SensorBID = require('./models/sensorbid.js')(mongoose);
// SensorBID.find({}, function(err, sensorbids) {
// sensorbids.forEach(function(sensorbid) {
// sensorbid.remove();
// });
// });
var Teams = require('./models/team.js')(mongoose);
Teams.count({
role: null
}, function(err, c) {
if (err) {
console.log(err);
}
});
var priorityList = require('./routes/priorityList.js');
var Designers = require('./models/designer.js')(mongoose);
var DesignerPriorityList = require('./models/designerPrioritylist.js')(mongoose);
var TeamPriorityList = require('./models/teamPrioritylist.js')(mongoose);
DesignerPriorityList.find({}).select({
designerName: 1,
list: 1,
_id:0
}).exec(function(err, designerPrioritylists) {
TeamPriorityList.find({}).select({
teamName: 1,
list: 1,
_id:0
}).exec(function(err, teamPrioritylists) {
priorityList.handlePriorityListRoundFinished(Teams, Designers, designerPrioritylists, teamPrioritylists);
});
});