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:
DrinkMe
2026-06-02 14:01:07 +02:00
committed by GitHub
parent 5a28264b19
commit 3faef0d0ff
+1 -1
View File
@@ -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