Skip to content
Browse files

fix some spaces

  • Loading branch information...
1 parent 0745b1d commit f982fd166d225a375de78e734b1d1f1cbf47d03e @szabgab committed
Showing with 10 additions and 11 deletions.
  1. +10 −10 lib/Dwimmer.pm
  2. +0 −1 views/index.tt
View
20 lib/Dwimmer.pm
@@ -7,8 +7,8 @@ our $VERSION = '0.01';
get '/' => sub {
my $filename = config->{dwimmer}{json};
- my $json = -e $filename ? read_file $filename : '{}';
- my $data = from_json $json;
+ my $json = -e $filename ? read_file $filename : '{}';
+ my $data = from_json $json;
template 'index', {data => $data};
};
@@ -19,16 +19,16 @@ get '/page' => sub {
post '/page' => sub {
my $filename = config->{dwimmer}{json};
- my $json = -e $filename ? read_file $filename : '{}';
- my $data = from_json $json;
+ my $json = -e $filename ? read_file $filename : '{}';
+ my $data = from_json $json;
my $now = time;
- $data->{$now} = {
- title => params->{title},
- text => params->{text},
- };
+ $data->{$now} = {
+ title => params->{title},
+ text => params->{text},
+ };
- write_file $filename, to_json($data);
- redirect '/';
+ write_file $filename, to_json($data);
+ redirect '/';
};
true;
View
1 views/index.tt
@@ -1,6 +1,5 @@
Hi
<a href="/page">add a new entry</a>
-<hr />
<% FOR e IN data.keys.sort %>
<hr />

0 comments on commit f982fd1

Please sign in to comment.
Something went wrong with that request. Please try again.