=cut
use VJournal::Session;
+use VJournal::ProviderList;
use JSON;
use CGI;
my $cgi=new CGI;
-my $session = VJourna::Session->new($cgi);
+my $session = VJournal::Session->new($cgi);
my $out={};
if (!defined $session) {
# User is not authenticated. Return list of providers;
$out->{state}="notlogged";
$sites=VJournal::ProviderList->new;
- $out->{providers}=$sites->menu;
+ $out->{providers}=[ $sites->menu ] ;
$session=$cgi;
} else {
if ($session->isowner()) {
}
}
-$session->header(-content_type=>"text/json",-charset=>utf-8);
-print $encode_json($out);
+print $session->header(-content_type=>"text/json",-charset=>"utf-8");
+print encode_json($out);