From 7e8f5f0e842c52b928fd7d8ac97da45bf9f7fc83 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 7 Dec 2015 18:26:13 +0200 Subject: [PATCH] Purge problem/contest list after adding problem/contest --- lib/Gruntmaster/App/Command/Add.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Gruntmaster/App/Command/Add.pm b/lib/Gruntmaster/App/Command/Add.pm index b54e4ab..38f7836 100644 --- a/lib/Gruntmaster/App/Command/Add.pm +++ b/lib/Gruntmaster/App/Command/Add.pm @@ -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; -- 2.39.2