summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNEdit.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-09-11 15:34:44 +0200
committerYorhel <git@yorhel.nl>2019-09-11 15:40:08 +0200
commit8c1faad14d4e4be29c464a3dcf3e2f340c6f8242 (patch)
tree0b366f98bf2328bae9e1e1ce5ae4404cdfc049d2 /lib/VNDB/Handler/VNEdit.pm
parenteab9409133bab856d04ba78e172535ba8099e7f7 (diff)
VNDB::Types: Convert staff_roles into %CREDIT_TYPE
Part one in converting data/global.pl lists into a separate VNDB::Types module. This is basically what I had started with VN3::Types, but it looks like a gradual rewrite/cleanup may be more successful. At least it'll be more useful on the short term.
Diffstat (limited to 'lib/VNDB/Handler/VNEdit.pm')
-rw-r--r--lib/VNDB/Handler/VNEdit.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm
index e879c408..dd19aa6a 100644
--- a/lib/VNDB/Handler/VNEdit.pm
+++ b/lib/VNDB/Handler/VNEdit.pm
@@ -6,6 +6,7 @@ use warnings;
use TUWF ':html', ':xml';
use Image::Magick;
use VNDB::Func;
+use VNDB::Types;
TUWF::register(
@@ -127,7 +128,7 @@ sub edit {
{ post => 'img_nsfw', required => 0, default => 0 },
{ post => 'credits', required => 0, template => 'json', json_unique => ['aid','role'], json_sort => ['aid','role'], json_fields => [
{ field => 'aid', required => 1, template => 'id' },
- { field => 'role', required => 1, enum => [ keys %{$self->{staff_roles}} ] },
+ { field => 'role', required => 1, enum => [ keys %CREDIT_TYPE ] },
{ field => 'note', required => 0, maxlength => 250, default => '' },
]},
{ post => 'seiyuu', required => 0, template => 'json', json_unique => ['aid','cid'], json_sort => ['aid','cid'], json_fields => [