fix chat sw
This commit is contained in:
@@ -30,15 +30,16 @@ use Dojo::Model::Users;
|
||||
$r->any('/tst')->to('home#tst');
|
||||
# =============================================================================
|
||||
|
||||
# json ========================================================================
|
||||
$r->any('/json/*dreq')->to('data#simple');
|
||||
# =============================================================================
|
||||
|
||||
# candy =======================================================================
|
||||
$r->any('/json/candy/:command')->to('data#candy');
|
||||
$r->any('/candy')->to('home#candy');
|
||||
# =============================================================================
|
||||
|
||||
# json ========================================================================
|
||||
$r->any('/json/*dreq')->to('data#simple');
|
||||
# =============================================================================
|
||||
|
||||
# register user ===============================================================
|
||||
$r->any('/reg')->to('users#reg');
|
||||
# =============================================================================
|
||||
|
||||
@@ -2,7 +2,7 @@ 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 Dojo::Support qw{ log };
|
||||
use Net::Telnet;
|
||||
|
||||
my $server_name = "";
|
||||
@@ -13,7 +13,6 @@ sub simple{
|
||||
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