Store public IP of a peer in Peer object. Closes #3.

This commit is contained in:
Szymon Nowak 2014-01-25 21:18:42 +01:00
parent 450a8f8264
commit 91ba444278
3 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,7 @@
App.Peer = Ember.Object.extend({
uuid: null,
email: null,
public_ip: null,
peer: Ember.Object.create({
id: null,

View File

@ -16,7 +16,10 @@ FileDrop.Room.prototype.join = function (user) {
self.name = data.name,
$.extend(user, {uuid: data.uuid});
$.extend(user, {
uuid: data.uuid,
public_ip: data.public_ip
});
socket.emit('join', {
room: self.name,

View File

@ -44,7 +44,8 @@ app.get('/room', function (req, res) {
res.json({
name: name,
uuid: uuid.v1()
uuid: uuid.v1(),
public_ip: ip
});
});