revolucion

This commit is contained in:
mynah
2019-03-14 03:19:54 -06:00
parent fa0fbe9eb4
commit 26523cdca2
59 changed files with 156 additions and 169 deletions

View File

@@ -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);
}