projects
/
plack-app-gruntmaster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6eb88ef
)
Redirect to new job instead of job log on submit
author
Marius Gavrilescu
<marius@ieval.ro>
Fri, 16 Jan 2015 21:02:25 +0000
(23:02 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Fri, 16 Jan 2015 21:02:25 +0000
(23:02 +0200)
lib/Plack/App/Gruntmaster.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Plack/App/Gruntmaster.pm
b/lib/Plack/App/Gruntmaster.pm
index 1d8fc325e032d885fff24f672a0dd0274d829287..a809e4669863bc3d77bf4b17cfec39fd9680650e 100644
(file)
--- a/
lib/Plack/App/Gruntmaster.pm
+++ b/
lib/Plack/App/Gruntmaster.pm
@@
-216,7
+216,7
@@
sub dispatch_request{
my $source = $prog ? read_file $prog->path : $_{source_code};
unlink $prog->path if $prog;
- db->jobs->create({
+
my $newjob =
db->jobs->create({
maybe contest => $_{contest},
maybe private => problem->private,
date => time,
@@
-228,7
+228,7
@@
sub dispatch_request{
});
purge '/log/';
- redirect $_{contest} ? "/log/?contest=$_{contest}" : '/log/';
+ [303, [Location => '/log/' . $newjob->id], []]
}
}
}
This page took
0.010458 seconds
and
4
git commands to generate.