use entry::element_of to set action parameter

This commit is contained in:
Milan
2020-03-08 15:09:07 +01:00
parent 5c73484638
commit accc9393c7
19 changed files with 53 additions and 141 deletions

View File

@@ -13,6 +13,7 @@ use File::Temp();
use config();
use log();
use entry();
use localization();
use auth();
use uac();
@@ -542,8 +543,7 @@ sub check_params {
my $checked = {};
$checked->{error} = '';
$checked->{template} =
template::check( $config, $params->{template}, 'upload-audio-recordings' );
$checked->{template} = template::check( $config, $params->{template}, 'upload-audio-recordings' );
entry::set_numbers( $checked, $params, [
'project_id', 'studio_id', 'default_studio_id', 'series_id', 'event_id', 'id']);
@@ -554,8 +554,11 @@ sub check_params {
$checked->{studio_id} = -1;
}
$checked->{action} = entry::element_of($params->{action},
['update', 'delete']);
entry::set_strings( $checked, $params, [
'name', 'description', 'action', 'path' ]);
'name', 'description', 'path' ]);
$checked->{upload} = $params->{upload};
return $checked;