mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
Replace groupService's outdated member tracker with deviceService.trackGroup().
This commit is contained in:
@@ -114,15 +114,17 @@ module.exports = function(options) {
|
||||
})
|
||||
|
||||
app.get('/api/v1/group', function(req, res) {
|
||||
dbapi.loadGroupMembers(req.user.email)
|
||||
dbapi.loadGroup(req.user.email)
|
||||
.then(function(cursor) {
|
||||
return Promise.promisify(cursor.toArray, cursor)()
|
||||
.then(function(list) {
|
||||
list.forEach(function(device) {
|
||||
datautil.applyData(device)
|
||||
datautil.applyOwner(device, req.user)
|
||||
})
|
||||
res.json({
|
||||
success: true
|
||||
, group: {
|
||||
members: list
|
||||
}
|
||||
, devices: list
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user