Move System::jsonError to BaseModule->jsonError
- This will ensure headers set in BaseModule->run will be carried in jsonError scenarios - Make BaseApi->checkThrottleLimit an object method to use BaseModule->jsonError - Deprecate jsonError() method in Core\System
This commit is contained in:
@@ -45,13 +45,13 @@ class NoScrape extends BaseModule
|
||||
// view infos about a known profile (needs a login)
|
||||
$which = $a->getLoggedInUserNickname();
|
||||
} else {
|
||||
System::jsonError(403, 'Authentication required');
|
||||
$this->jsonError(403, 'Authentication required');
|
||||
}
|
||||
|
||||
$owner = User::getOwnerDataByNick($which);
|
||||
|
||||
if (empty($owner['uid'])) {
|
||||
System::jsonError(404, 'Profile not found');
|
||||
$this->jsonError(404, 'Profile not found');
|
||||
}
|
||||
|
||||
$json_info = [
|
||||
|
||||
Reference in New Issue
Block a user