mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-09-22 17:00:45 +02:00
Change database query from First to Find
This should allow all API-keys to be found and authenticated (not only the first one). This change is not tested though.
This commit is contained in:
@@ -282,7 +282,7 @@ func (r *User) GetAllAPIKeys(
|
||||
dbUsers := []database.User{}
|
||||
result := r.DB.
|
||||
Select("id, api_key").
|
||||
First(&dbUsers)
|
||||
Find(&dbUsers)
|
||||
|
||||
if result.Error != nil {
|
||||
return apiKeys, result.Error
|
||||
|
||||
Reference in New Issue
Block a user