Try to fix error Method [] not found for $app
authorkenstir <kenstir@gmail.com>
Sun, 24 May 2020 22:21:03 +0000 (18:21 -0400)
committerkenstir <kenstir@gmail.com>
Sun, 24 May 2020 22:21:03 +0000 (18:21 -0400)
Open-ILS/src/perlmods/lib/OpenILS/Application/Selfcheck.pm

index ec838bf..5583fdb 100644 (file)
@@ -27,10 +27,10 @@ sub enabled {
     );
 }
 __PACKAGE__->register_method(
-    method   => "enabled",
+    method => "enabled",
     api_name => "open-ils.selfcheck.enabled",
-    stream   => 1,
-    argc     => 0,
+    api_level => 1,
+    argc => 0,
     signature => {
         desc => 'Check if selfcheck is enabled',
         return => {
@@ -40,4 +40,18 @@ __PACKAGE__->register_method(
     }
 );
 
+sub xyzzy {
+    my ($self, $conn, $authtoken) = @_;
+
+    return new OpenILS::Event("SELFCHECK_NOT_ALLOWED") unless ($U->is_true(
+        $U->ou_ancestor_setting_value($org, 'circ.selfcheck')
+    ));
+
+    return 'xyzzy';
+}
+__PACKAGE__->register_method(
+    method => "xyzzy",
+    api_name => "open-ils.selfcheck.xyzzy"
+);
+
 1;