Merge branch 'master' into save_change
[MojoFacets.git] / script / changes
index 94bd426..ca31147 100755 (executable)
@@ -5,6 +5,7 @@ use warnings;
 
 use Storable;
 use Mojo::Client;
+use Data::Dump qw(dump);
 
 my $url = 'http://localhost:3000/data/edit';
 my $max = 1;
@@ -19,8 +20,12 @@ foreach my $c ( @changes ) {
        print "# $c\n";
 
        my $params = retrieve $c;
+       my $hash = $params->to_hash;
+       $hash->{time} = $1 if $c =~ m{/(\d+\.\d+)\.data\.edit};
 
-       my $tx = $t->post_form( $url => $params->to_hash );
+       warn "# hash ",dump($hash);
+
+       my $tx = $t->post_form( $url => $hash );
        if ( my $res = $tx->success) { print $res->body }
        else {
                my ($code, $message) = $tx->error;