1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

Add API endpoints for loading devices.

This commit is contained in:
Simo Kinnunen 2014-01-31 04:27:04 +09:00
parent 52ae7765c8
commit c119e2c3d2
2 changed files with 38 additions and 0 deletions

View file

@ -69,3 +69,11 @@ module.exports.saveDeviceIdentity = function(serial, identity) {
, display: identity.display
}))
}
module.exports.loadDevices = function() {
return db.run(r.table('devices'))
}
module.exports.loadDevice = function(serial) {
return db.run(r.table('devices').get(serial))
}