|
|
@ -45,9 +45,8 @@ sub view { |
|
|
|
eval { |
|
|
|
eval { |
|
|
|
my $path = $self->_data_path($time); |
|
|
|
my $path = $self->_data_path($time); |
|
|
|
my $data = Mojo::Asset::File->new(path => $path); |
|
|
|
my $data = Mojo::Asset::File->new(path => $path); |
|
|
|
$data->cleanup(0); |
|
|
|
|
|
|
|
my $json = decode_json($data->slurp); |
|
|
|
my $json = decode_json($data->slurp); |
|
|
|
die("image expired\n") if (time() > $data->{expire}); |
|
|
|
die("image expired\n") if (time() > $json->{expire}); |
|
|
|
$json->{path} = $self->_image_path($time, $json->{format}); |
|
|
|
$json->{path} = $self->_image_path($time, $json->{format}); |
|
|
|
|
|
|
|
|
|
|
|
$self->stash(image => $json); 1; |
|
|
|
$self->stash(image => $json); 1; |
|
|
|