mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
Move jsonError out of Factory\Api\Mastodon\Error->Unauthorized
This commit is contained in:
parent
7486ebdc10
commit
6a2ca1a6b6
4 changed files with 10 additions and 13 deletions
|
@ -50,8 +50,8 @@ class Revoke extends BaseApi
|
|||
$condition = ['client_id' => $request['client_id'], 'client_secret' => $request['client_secret'], 'access_token' => $request['token']];
|
||||
$token = DBA::selectFirst('application-view', ['id'], $condition);
|
||||
if (empty($token['id'])) {
|
||||
Logger::notice('Token not found', $condition);
|
||||
DI::mstdnError()->Unauthorized();
|
||||
$this->logger->notice('Token not found', $condition);
|
||||
$this->logErrorAndJsonExit(401, $this->errorFactory->Unauthorized());
|
||||
}
|
||||
|
||||
DBA::delete('application-token', ['application-id' => $token['id']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue