mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 15:23:12 +08:00
Add new command to delete API keys
This commit is contained in:
@@ -68,6 +68,17 @@ readonly class ApiKeyService implements ApiKeyServiceInterface
|
||||
return new ApiKeyCheckResult($apiKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function deleteByName(string $apiKeyName): void
|
||||
{
|
||||
$affectedResults = $this->repo->deleteByName($apiKeyName);
|
||||
if ($affectedResults === 0) {
|
||||
throw ApiKeyNotFoundException::forName($apiKeyName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user