Purge problem/contest list after adding problem/contest
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / Add.pm
index 8f84dc3dbbeea559815ff92a7f363262fe5966c8..38f7836edff76704cdfd6d6af625dd3a95856c69 100644 (file)
@@ -3,7 +3,7 @@ package Gruntmaster::App::Command::Add;
 use 5.014000;
 use warnings;
 
-our $VERSION = '5999.000_014';
+our $VERSION = '5999.000_015';
 
 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;
This page took 0.009787 seconds and 4 git commands to generate.