Skip to content

Commit

Permalink
Fix for broken API
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiddo committed Nov 2, 2024
1 parent d2142c4 commit 74d5a3c
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,14 @@ public function onDispatch(MvcEvent $e)
)
) {
$error = $this->error(401, 'You do not have sufficient permissions to access this resource');
if ($result instanceof \Laminas\View\Model\ViewModel) {
$error->setOptions($result->getOptions());
}
$error->setOptions($result->getOptions());
$e->setResult($error);

return $error;
}
} else {
$error = $this->error(401, 'No key or OAuth token was provided or the token was invalid');
if ($result instanceof \Laminas\View\Model\ViewModel) {
$error->setOptions($result->getOptions());
}
$error->setOptions($result->getOptions());
$e->setResult($error);

return $error;
Expand Down

0 comments on commit 74d5a3c

Please sign in to comment.