Fix sending invitations with UTF-8 chars

This commit is contained in:
Daniel Berteaud 2015-10-01 11:34:01 +02:00
parent 765670338c
commit 531eff3ca3
1 changed files with 2 additions and 1 deletions

3
vroom
View File

@ -23,6 +23,7 @@ use File::Path qw(make_path);
use File::Basename;
use DateTime;
use Array::Diff;
use Encode qw(encode_utf8);
use Data::Dumper;
use lib dirname($0) . '/lib';
@ -1662,7 +1663,7 @@ any '/api' => sub {
$self->login;
$self->purge_api_keys;
my $token = $self->req->headers->header('X-VROOM-API-Key') || $self->session('key');
my $req = Mojo::JSON::decode_json($self->param('req'));
my $req = Mojo::JSON::decode_json(encode_utf8($self->param('req')));
my $room;
# action and param are required for every API call
if (!$req->{action} || !$req->{param}){