summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Releases
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-11-29 13:47:23 +0100
committerYorhel <git@yorhel.nl>2021-11-29 13:47:25 +0100
commit5c95351cce9e7d8628a9a6c30456c714d4848593 (patch)
treeabc0f4c0301a1173356633e428087a32d697a5c7 /lib/VNWeb/Releases
parentfa86ca885a5aa08543207ad8a64d42f05ab52caf (diff)
Move undefbool validation to TUWF for better Elm interop
Requires upgrading TUWF to commit cbff0b7e7841ffce68cacea763fe3e59385f73e4
Diffstat (limited to 'lib/VNWeb/Releases')
-rw-r--r--lib/VNWeb/Releases/Edit.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/VNWeb/Releases/Edit.pm b/lib/VNWeb/Releases/Edit.pm
index 65cff99e..1c44ffb3 100644
--- a/lib/VNWeb/Releases/Edit.pm
+++ b/lib/VNWeb/Releases/Edit.pm
@@ -24,7 +24,7 @@ my $FORM = {
catalog => { required => 0, default => '', maxlength => 50 },
released => { default => 99999999, min => 1, rdate => 1 },
minage => { required => 0, default => undef, int => 1, enum => \%AGE_RATING },
- uncensored => { required => 0, jsonbool => 1 },
+ uncensored => { undefbool => 1 },
reso_x => { uint => 1, range => [0,32767] },
reso_y => { uint => 1, range => [0,32767] },
voiced => { uint => 1, enum => \%VOICED },
@@ -131,8 +131,6 @@ elm_api ReleaseEdit => $FORM_OUT, $FORM_IN, sub {
my $e = $new ? { id => 0 } : db_entry $data->{id} or return tuwf->resNotFound;
return elm_Unauth if !can_edit r => $e;
- $data->{uncensored} = $data->{uncensored}?1:0 if defined $data->{uncensored};
-
if(!auth->permDbmod) {
$data->{hidden} = $e->{hidden}||0;
$data->{locked} = $e->{locked}||0;