🔨 refactor(schemas.py): update import statement for ApiKeyRead to reflect new file structure
🔨 refactor(schemas.py): update import statement for ApiKeyRead to reflect
This commit is contained in:
parent
eb02220aad
commit
edd58705e4
3 changed files with 22 additions and 9 deletions
|
|
@ -1,7 +1,8 @@
|
|||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from langflow.services.database.models.api_key import ApiKeyRead
|
||||
from uuid import UUID
|
||||
from langflow.services.database.models.api_key.api_key import ApiKeyRead
|
||||
from langflow.services.database.models.flow import FlowCreate, FlowRead
|
||||
from langflow.services.database.models.user import UserRead
|
||||
from pydantic import BaseModel, Field, validator
|
||||
|
|
@ -138,12 +139,24 @@ class ComponentListRead(BaseModel):
|
|||
flows: List[FlowRead]
|
||||
|
||||
|
||||
class ApiKeyResponse(BaseModel):
|
||||
total_count: int
|
||||
user_id: str
|
||||
api_keys: List[ApiKeyRead]
|
||||
|
||||
|
||||
class UsersResponse(BaseModel):
|
||||
total_count: int
|
||||
users: List[UserRead]
|
||||
|
||||
|
||||
class ApiKeyResponse(BaseModel):
|
||||
id: str
|
||||
api_key: str
|
||||
name: str
|
||||
created_at: str
|
||||
last_used_at: str
|
||||
|
||||
|
||||
class ApiKeysResponse(BaseModel):
|
||||
total_count: int
|
||||
user_id: UUID
|
||||
api_keys: List[ApiKeyRead]
|
||||
|
||||
|
||||
class CreateApiKeyRequest(BaseModel):
|
||||
name: str
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from langflow.services.auth.utils import (
|
|||
get_current_active_user,
|
||||
get_password_hash,
|
||||
)
|
||||
from langflow.services.database.models.user.utils import (
|
||||
from langflow.services.database.models.user.crud import (
|
||||
update_user,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import Annotated, Coroutine
|
|||
from uuid import UUID
|
||||
from langflow.services.auth.service import AuthManager
|
||||
from langflow.services.database.models.user.user import User
|
||||
from langflow.services.database.models.user.utils import (
|
||||
from langflow.services.database.models.user.crud import (
|
||||
get_user_by_id,
|
||||
get_user_by_username,
|
||||
update_user_last_login_at,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue