revolucion
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
package Dojo::Controller::Data;
|
||||
use Mojo::File 'path';
|
||||
use Mojo::JSON qw(decode_json encode_json);
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
use Dojo::Support qw{ dmph merge_hash load_module };
|
||||
use Net::Telnet;
|
||||
|
||||
my $server_name = "";
|
||||
our $t; #telnet server object
|
||||
my $data_path = path('lib/Dojo/Model/Data')->make_path;
|
||||
sub simple{
|
||||
my $c=shift;
|
||||
my $n=$c->param("dreq")//"";
|
||||
my $json = {status => "304"};
|
||||
$json = { srv =>$c->config->{radio_server} } if $n =~m/^radio$/ ;
|
||||
$json = candy() if $n =~m/^candy$/ ;
|
||||
$json = decode_json($data_path->child("$n")->slurp)
|
||||
if $n=~m/^podcast\/podcast.json$/;
|
||||
$c->render(json=>$json);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user