Fixes on API::Submission
This commit is contained in:
parent
9c27bf131e
commit
aa7efab83f
@ -1,6 +1,6 @@
|
||||
#! /usr/bin/env perl
|
||||
|
||||
package Submission;
|
||||
package API::Submission;
|
||||
|
||||
use v5.10.1;
|
||||
use strict;
|
||||
@ -16,7 +16,7 @@ sub add($$$$$)
|
||||
my $user = shift;
|
||||
my $log = shift;
|
||||
|
||||
my $res = Base::send('ResultHandler', "projects/submissions/add.xml", [ leader_login => $user, project_name => $project, year => $year, log => $log, tag => $tag ]);
|
||||
my $res = API::Base::send('ResultHandler', "projects/submissions/add.xml", [ leader_login => $user, project_name => $project, year => $year, log => $log, tag => $tag ]);
|
||||
|
||||
if ($res->{result} == '0') {
|
||||
say "Rendu ok";
|
||||
@ -33,10 +33,10 @@ sub get($$$$)
|
||||
my $tag = shift;
|
||||
my $user = shift;
|
||||
|
||||
my $res = Base::get('ResultHandler', "projects/submissions/get/$project/$year/$user/$tag.xml");
|
||||
my $res = API::Base::get('ResultHandler', "projects/submissions/get/$project/$year/$user/$tag.xml");
|
||||
|
||||
if ($res->{result} == '0') {
|
||||
say "Rendu ok";
|
||||
say "Rendu déjà effectué";
|
||||
}
|
||||
elsif ($res->{result} == '1') {
|
||||
say "Pas encore rendu";
|
||||
|
Reference in New Issue
Block a user