Skip to content

Commit ad0d164

Browse files
Arta AsadiArta Asadi
Arta Asadi
authored and
Arta Asadi
committed
fix: fix list api keys
1 parent 8ae0ef2 commit ad0d164

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

services/auth/http.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,15 @@ func (r *httpRoutes) EditAPIKey(ctx echo.Context) error {
488488

489489
// ListAPIKeys lists API keys for the currently authenticated user.
490490
func (r *httpRoutes) ListAPIKeys(ctx echo.Context) error {
491-
externalUserID := httpserver.GetUserID(ctx)
492-
if externalUserID == "" {
493-
r.logger.Error("Unable to get user ID from context in ListAPIKeys")
494-
return echo.NewHTTPError(http.StatusUnauthorized, "Cannot identify authenticated user")
495-
}
491+
//externalUserID := httpserver.GetUserID(ctx)
492+
//if externalUserID == "" {
493+
// r.logger.Error("Unable to get user ID from context in ListAPIKeys")
494+
// return echo.NewHTTPError(http.StatusUnauthorized, "Cannot identify authenticated user")
495+
//}
496496

497-
keys, err := r.db.ListApiKeysForUser(externalUserID)
497+
keys, err := r.db.ListApiKeys()
498498
if err != nil {
499-
r.logger.Error("Failed to list API keys for user", zap.String("externalId", externalUserID), zap.Error(err))
499+
r.logger.Error("Failed to list API keys", zap.Error(err))
500500
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to retrieve API keys")
501501
}
502502

0 commit comments

Comments
 (0)