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:
parent
cc42b7c51f
commit
30b04ab2d2
5 changed files with 47 additions and 12 deletions
|
@ -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'))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue