🔧 chore(api_key.py): remove unused import 'httpx.get' to improve code cleanliness and reduce potential confusion

🐛 fix(api_key.py): fix import statement for 'get_current_active_user' function in 'auth_utils' module to resolve import error
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-18 17:47:32 -03:00
commit 986f7202d2

View file

@ -1,6 +1,5 @@
from uuid import UUID
from fastapi import APIRouter, HTTPException, Depends, Body
from httpx import get
from langflow.api.v1.schemas import ApiKeysResponse
from langflow.services.auth import utils as auth_utils
from langflow.services.database.models.api_key.api_key import (
@ -35,7 +34,7 @@ router = APIRouter(tags=["APIKey"], prefix="/api_key")
@router.get("/", response_model=ApiKeysResponse)
def get_api_keys_route(
db: Session = Depends(get_session),
current_user: User = Depends(auth_utils.auth_utils.get_current_active_user),
current_user: User = Depends(auth_utils.get_current_active_user),
):
try:
user_id = current_user.id