X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FApp%2FCommand%2FAdd.pm;h=e3a596beeb21c5c058f2b349de86a0ab8d20ffa4;hb=b35cbc0d6ca5baf03ffbeb2b9a375fa71f4d0ad3;hp=b54e4abdd1841126d6fd4b4acf66b4cfc7788017;hpb=add75bf5fd4cdb38773dc60653f908d3a42b57e2;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/App/Command/Add.pm b/lib/Gruntmaster/App/Command/Add.pm index b54e4ab..e3a596b 100644 --- a/lib/Gruntmaster/App/Command/Add.pm +++ b/lib/Gruntmaster/App/Command/Add.pm @@ -3,7 +3,7 @@ package Gruntmaster::App::Command::Add; use 5.014000; use warnings; -our $VERSION = '5999.000_015'; +our $VERSION = '5999.000_016'; use Gruntmaster::App '-command'; use Gruntmaster::Data; @@ -52,6 +52,7 @@ sub add_contest { my $stop = str2time prompt 'Stop time' or die "Cannot parse time\n"; db->insert(contests => {id => $id, name => $name, owner => $owner, start => $start, stop => $stop}); + purge '/ct/'; } sub add_problem { @@ -118,6 +119,7 @@ sub add_problem { $options{tests} = encode_json \@tests if @tests; db->insert(problems => \%options); db->insert(contest_problems => {problem => $id, contest => $contest}) if $contest; + purge '/pb/'; } 1; @@ -150,7 +152,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2014-2015 by Marius Gavrilescu +Copyright (C) 2014-2016 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.1 or,