From 3faef0d0ff33087550c872a61c6c65b7893e1c29 Mon Sep 17 00:00:00 2001 From: DrinkMe Date: Tue, 2 Jun 2026 14:01:07 +0200 Subject: [PATCH] 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. --- backend/repository/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/repository/user.go b/backend/repository/user.go index 38d4a74..6a81143 100644 --- a/backend/repository/user.go +++ b/backend/repository/user.go @@ -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