]> iEval git - plack-app-gruntmaster.git/blobdiff - lib/Gruntmaster/Page/CSS.pm
Enforce private problems and jobs
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / CSS.pm
index 0f4bf6a8193c88b2ee55f96d17285687670e0eaf..25b613777acc737b295d544bdbe7b0452ef2cec3 100644 (file)
@@ -11,8 +11,9 @@ use File::Slurp qw/read_file/;
 use CSS::Minifier::XS qw/minify/;
 
 sub generate{
-       my ($self, $format, $logger, $theme) = @_;
-       debug $logger => "theme is $theme";
+       my ($self, $format, $env, $theme) = @_;
+       debug $env => "theme is $theme";
+       return [404, ['Content-Type' => 'text/plain'], [ 'Not found' ]] unless -e "css/themes/$theme.css";
        my $css = read_file "css/themes/$theme.css";
        $css .= read_file $_ for <css/*.css>;
        [200, ['Content-Type' => 'text/css', 'Cache-Control' => 'public, max-age=604800'], [minify $css] ]
This page took 0.023008 seconds and 4 git commands to generate.