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:
@@ -89,7 +89,7 @@ class Profile extends BaseProfile
|
||||
header('Cache-Control: max-age=23200, stale-while-revalidate=23200');
|
||||
$this->jsonExit($data, 'application/activity+json');
|
||||
} catch (HTTPException\NotFoundException $e) {
|
||||
System::jsonError(404, ['error' => 'Record not found']);
|
||||
$this->jsonError(404, ['error' => 'Record not found']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,10 +97,10 @@ class Profile extends BaseProfile
|
||||
// Known deleted user
|
||||
$data = ActivityPub\Transmitter::getDeletedUser($this->parameters['nickname']);
|
||||
|
||||
System::jsonError(410, $data);
|
||||
$this->jsonError(410, $data);
|
||||
} else {
|
||||
// Any other case (unknown, blocked, nverified, expired, no profile, no self contact)
|
||||
System::jsonError(404, []);
|
||||
$this->jsonError(404, []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user