1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Keep forwards list up to date on client side.

This commit is contained in:
Simo Kinnunen 2014-04-15 18:02:48 +09:00
parent b0400130ff
commit fb3892ab07
2 changed files with 21 additions and 1 deletions

View file

@ -505,6 +505,7 @@ module.exports = function(options) {
}
dbapi.addUserForward(user.email, data)
.then(function() {
socket.emit('forward.create', data)
joinChannel(responseChannel)
push.send([
channel
@ -518,6 +519,7 @@ module.exports = function(options) {
.on('forward.remove', function(channel, responseChannel, data) {
dbapi.removeUserForward(user.email, data.devicePort)
.then(function() {
socket.emit('forward.remove', data)
joinChannel(responseChannel)
push.send([
channel