Fix failing tests

This commit is contained in:
DaneEveritt 2022-05-29 20:39:51 -04:00
parent a5521ecb79
commit 9300e1116d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 9 additions and 4 deletions

View file

@ -60,13 +60,14 @@ class ApiKeyController extends ClientApiController
*/
public function delete(ClientApiRequest $request, string $identifier)
{
/** @var \Pterodactyl\Models\ApiKey $key */
$key = $request->user()->apiKeys()
->where('key_type', ApiKey::TYPE_ACCOUNT)
->where('identifier', $identifier)
->first();
->firstOrFail();
Activity::event('user:api-key.delete')
->property('identifer', $key->identifer)
->property('identifer', $key->identifier)
->log();
$key->delete();