mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Make sure we've invited the device when we go to the control page. Refuse to show the control page on failure.
This commit is contained in:
@@ -57,7 +57,10 @@ module.exports = function GroupServiceFactory($rootScope, $http, socket, UserSer
|
||||
}
|
||||
})
|
||||
return tx.promise.then(function(results) {
|
||||
return results[0].success
|
||||
if (!results[0].success) {
|
||||
throw new Error('Device refused to join the group')
|
||||
}
|
||||
return results[0].device
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -72,7 +75,10 @@ module.exports = function GroupServiceFactory($rootScope, $http, socket, UserSer
|
||||
}
|
||||
})
|
||||
return tx.promise.then(function(results) {
|
||||
return results[0].success
|
||||
if (!results[0].success) {
|
||||
throw new Error('Device refused to be kicked from the group')
|
||||
}
|
||||
return results[0].device
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user