Skip to content

Commit

Permalink
Update ApiKeyRepository.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kokofixcomputers authored Oct 12, 2024
1 parent 15f8aec commit 6ff209f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Repositories/Eloquent/ApiKeyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function getAccountKeys(User $user): Collection
}

/**
* Get all the application API keys that exist for a specific user.
* Get all the application API keys that exist.
*/
public function getApplicationKeys(User $user): Collection
public function getApplicationKeys(): Collection
{
return $this->getBuilder()->where('user_id', $user->id)
return $this->getBuilder()
->where('key_type', ApiKey::TYPE_APPLICATION)
->get($this->getColumns());
}
Expand All @@ -49,11 +49,11 @@ public function deleteAccountKey(User $user, string $identifier): int
}

/**
* Delete an application API key from the panel for a specific user.
* Delete an application API key from the panel.
*/
public function deleteApplicationKey(User $user, string $identifier): int
public function deleteApplicationKey(string $identifier): int
{
return $this->getBuilder()->where('user_id', $user->id)
return $this->getBuilder()
->where('key_type', ApiKey::TYPE_APPLICATION)
->where('identifier', $identifier)
->delete();
Expand Down

0 comments on commit 6ff209f

Please sign in to comment.