update to new x.json.x syntax on server
This commit is contained in:
parent
453745dd4b
commit
2e7b58ae85
1 changed files with 6 additions and 6 deletions
12
server.js
12
server.js
|
@ -134,7 +134,7 @@ function scrub( text ) {
|
||||||
|
|
||||||
joinRoom(client, message.data, function(clients) {
|
joinRoom(client, message.data, function(clients) {
|
||||||
|
|
||||||
client.send( { action: 'roomAccept', data: '' } );
|
client.json.send( { action: 'roomAccept', data: '' } );
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ function initClient ( client )
|
||||||
|
|
||||||
db.getAllCards( room , function (cards) {
|
db.getAllCards( room , function (cards) {
|
||||||
|
|
||||||
client.send(
|
client.json.send(
|
||||||
{
|
{
|
||||||
action: 'initCards',
|
action: 'initCards',
|
||||||
data: cards
|
data: cards
|
||||||
|
@ -351,7 +351,7 @@ function initClient ( client )
|
||||||
|
|
||||||
|
|
||||||
db.getAllColumns ( room, function (columns) {
|
db.getAllColumns ( room, function (columns) {
|
||||||
client.send(
|
client.json.send(
|
||||||
{
|
{
|
||||||
action: 'initColumns',
|
action: 'initColumns',
|
||||||
data: columns
|
data: columns
|
||||||
|
@ -364,7 +364,7 @@ function initClient ( client )
|
||||||
|
|
||||||
if (theme == null) theme = 'bigcards';
|
if (theme == null) theme = 'bigcards';
|
||||||
|
|
||||||
client.send(
|
client.json.send(
|
||||||
{
|
{
|
||||||
action: 'changeTheme',
|
action: 'changeTheme',
|
||||||
data: theme
|
data: theme
|
||||||
|
@ -375,7 +375,7 @@ function initClient ( client )
|
||||||
db.getBoardSize( room, function(size) {
|
db.getBoardSize( room, function(size) {
|
||||||
|
|
||||||
if (size != null) {
|
if (size != null) {
|
||||||
client.send(
|
client.json.send(
|
||||||
{
|
{
|
||||||
action: 'setBoardSize',
|
action: 'setBoardSize',
|
||||||
data: size
|
data: size
|
||||||
|
@ -401,7 +401,7 @@ function initClient ( client )
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('initialusers: ' + roommates);
|
console.log('initialusers: ' + roommates);
|
||||||
client.send(
|
client.json.send(
|
||||||
{
|
{
|
||||||
action: 'initialUsers',
|
action: 'initialUsers',
|
||||||
data: roommates
|
data: roommates
|
||||||
|
|
Loading…
Add table
Reference in a new issue