mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 10:48:53 +00:00
Make API responses uniform
This commit is contained in:
@@ -98,7 +98,11 @@ class GetNzbController extends BasePageController
|
||||
*/
|
||||
private function getUserDataFromSession(): array|Response
|
||||
{
|
||||
if ($this->userdata->hasRole('Disabled')) {
|
||||
if (! $this->userdata->hasVerifiedEmail()) {
|
||||
return showApiError(100);
|
||||
}
|
||||
|
||||
if ($this->userdata->is_disabled || $this->userdata->hasRole('Disabled')) {
|
||||
return showApiError(101);
|
||||
}
|
||||
|
||||
@@ -126,7 +130,7 @@ class GetNzbController extends BasePageController
|
||||
return showApiError(100);
|
||||
}
|
||||
|
||||
if ($user->hasRole('Disabled')) {
|
||||
if ($user->is_disabled || $user->hasRole('Disabled')) {
|
||||
return showApiError(101);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user