A few fixes for NCIP::ILS::Evergreen.
authorJason Stephenson <jason@sigio.com>
Sat, 23 Aug 2014 14:59:28 +0000 (10:59 -0400)
committerJason Stephenson <jason@sigio.com>
Sat, 23 Aug 2014 14:59:28 +0000 (10:59 -0400)
We need to get the username, password, workstation, etc. from the
credentials member of the config hash.

Also fix a typo on line 459 by deleting an extraneous -.

Signed-off-by: Jason Stephenson <jason@sigio.com>
lib/NCIP/ILS/Evergreen.pm

index 727a105..f97156f 100644 (file)
@@ -337,7 +337,7 @@ sub login {
     my $seed = $U->simplereq(
         'open-ils.auth',
         'open-ils.auth.authenticate.init',
-        $self->{config}->{username}
+        $self->{config}->{credentials}->{username}
     );
 
     # Actually login.
@@ -346,12 +346,12 @@ sub login {
             'open-ils.auth',
             'open-ils.auth.authenticate.complete',
             {
-                username => $self->{config}->{username},
+                username => $self->{config}->{credentials}->{username},
                 password => md5_hex(
-                    $seed . md5_hex($self->{config}->{password})
+                    $seed . md5_hex($self->{config}->{credentials}->{password})
                 ),
                 type => 'staff',
-                workstation => $self->{config}->{workstation}
+                workstation => $self->{config}->{credentials}->{workstation}
             }
         );
         if ($response) {
@@ -456,7 +456,7 @@ sub _init {
                 my $result = $e->retrieve_config_bib_source($data->{cbs});
                 $cbs = $result if ($result);
             } else {
-                my $result = $e->search_config_bib_source({source => $data-});
+                my $result = $e->search_config_bib_source({source => $data});
                 if ($result && @$result) {
                     $cbs = $result->[0]; # Use the first one.
                 }