mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Reverse port forwarding backend actually works now. UI needs some work for the "new vision".
This commit is contained in:
parent
d55ccebdc5
commit
617e20522b
10 changed files with 395 additions and 195 deletions
|
@ -100,23 +100,6 @@ dbapi.lookupUserByAdbFingerprint = function(fingerprint) {
|
|||
})
|
||||
}
|
||||
|
||||
dbapi.addUserForward = function(email, forward) {
|
||||
var devicePort = forward.devicePort
|
||||
return db.run(r.table('users').get(email).update({
|
||||
forwards: r.row('forwards').default([]).filter(function(forward) {
|
||||
return forward('devicePort').ne(devicePort)
|
||||
}).append(forward)
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.removeUserForward = function(email, devicePort) {
|
||||
return db.run(r.table('users').get(email).update({
|
||||
forwards: r.row('forwards').default([]).filter(function(forward) {
|
||||
return forward('devicePort').ne(devicePort)
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.loadGroup = function(email) {
|
||||
return db.run(r.table('devices').getAll(email, {
|
||||
index: 'owner'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue