diff --git a/lib/CF/Controller/Websockets.pm b/lib/CF/Controller/Websockets.pm index 6372c181b2c15beb7847a8f46de5ee5fd835434f..cbabd5d7ac13fdcde995d08990f251e393f20ad2 100644 --- a/lib/CF/Controller/Websockets.pm +++ b/lib/CF/Controller/Websockets.pm @@ -26,15 +26,15 @@ sub main { my $listener_online = $pubsub->listen('online:0' => sub($pubsub, $payload) { #TODO: event_id my @counts = split ' ', $payload; - $c->send(json => { + $c->send({json => { event => 'online_users_updated', payload => { - all => $counts[0], - members => $counts[1], - group_size_full => $counts[2], - group_size_half => $counts[3], + all => $counts[0]+0, + members => $counts[1]+0, + group_size_full => $counts[2]+0, + group_size_half => $counts[3]+0, } - }); + }}); }); $c->on(json => sub( $c, $message ) { diff --git a/openapi.yaml b/openapi.yaml index 4ae6b284fdf1778c9b9f4612f2127885c81de032..406655ba47646587215ae3c4726a4740015c826a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: - version: "3.1.1" + version: "3.1.2" title: CF Online description: CF Online license: