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

Add convenience flags for knowing if a device is usable, ready, and owned by us.

This commit is contained in:
Simo Kinnunen 2014-03-18 15:06:02 +09:00
parent cc42b7c51f
commit 30b04ab2d2
5 changed files with 47 additions and 12 deletions

View file

@ -50,6 +50,11 @@ module.exports.applyData = function(device) {
return device
}
module.exports.applyOwner = function(device, user) {
device.isOwnedByUser = !!device.owner && device.owner.email === user.email
return device
}
module.exports.middleware = function() {
return express.static(pathutil.root('node_modules/stf-devices-db/data/small'))
}