Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Apr 11, 2022
1 parent 3d23da0 commit 66a9b6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function registerApiResources()
'name' => 'Categories',
'description' => 'An API resource for categories',
'actions' => [
'index', 'show:all', 'store:admin', 'update:admin', 'destroy:admin',
'index', 'show', 'store:admin', 'update:admin', 'destroy:admin',
],
],
'currencies' => [
Expand Down
2 changes: 1 addition & 1 deletion auth/SanctumProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function authenticate(Request $request, Route $route)
if (!$this->authManager->checkGroup($allowedGroup, $accessToken))
throw new AccessDeniedHttpException(lang('igniter.api::default.alert_auth_restricted'));

return $accessToken->tokenable;
return optional($accessToken)->tokenable;
}

protected function getAllowedGroup(Route $route)
Expand Down
2 changes: 1 addition & 1 deletion models/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected function processOptions($definition)
}

$action = explode(':', $action, 2);
$result[$action[0]] = $action[1] ?? 'admin';
$result[$action[0]] = $action[1] ?? 'all';
$names[$action[0]] = array_get(self::$defaultActionDefinition, $action[0], $name);
}

Expand Down

0 comments on commit 66a9b6d

Please sign in to comment.