mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Add convenience flags for knowing if a device is usable, ready, and owned by us.
This commit is contained in:
@@ -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'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user