1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Make GroupService keep the list of members up to date.

This commit is contained in:
Simo Kinnunen 2014-02-07 11:55:41 +09:00
parent 6ae7c310e0
commit 277c9b401a
4 changed files with 58 additions and 10 deletions

View file

@ -30,6 +30,12 @@ dbapi.loadUser = function(email) {
return db.run(r.table('users').get(email))
}
dbapi.loadGroupMembers = function(email) {
return db.run(r.table('devices').getAll(email, {
index: 'ownerEmail'
})('serial'))
}
dbapi.saveDeviceLog = function(serial, entry) {
return db.run(r.table('logs').insert({
serial: entry.serial