Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): topology route mistakenly removed #1790

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions keep/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
settings,
status,
tags,
topology,
whoami,
workflows,
)
Expand Down Expand Up @@ -218,6 +219,7 @@ def get_app(
)
app.include_router(dashboard.router, prefix="/dashboard", tags=["dashboard"])
app.include_router(tags.router, prefix="/tags", tags=["tags"])
app.include_router(topology.router, prefix="/topology", tags=["topology"])

# if its single tenant with authentication, add signin endpoint
logger.info(f"Starting Keep with authentication type: {AUTH_TYPE}")
Expand Down
5 changes: 3 additions & 2 deletions keep/api/routes/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from keep.api.core.db import ( # Assuming this function exists to fetch topology data
get_all_topology_data,
)
from keep.api.core.dependencies import AuthenticatedEntity, AuthVerifier
from keep.api.models.db.topology import TopologyServiceDtoOut
from keep.identitymanager.authenticatedentity import AuthenticatedEntity
from keep.identitymanager.identitymanagerfactory import IdentityManagerFactory

logger = logging.getLogger(__name__)
router = APIRouter()
Expand All @@ -22,7 +23,7 @@ def get_topology_data(
service_id: Optional[str] = None,
environment: Optional[str] = None,
authenticated_entity: AuthenticatedEntity = Depends(
AuthVerifier(["read:topology"])
IdentityManagerFactory.get_auth_verifier(["read:topology"])
),
) -> List[TopologyServiceDtoOut]:
tenant_id = authenticated_entity.tenant_id
Expand Down
Loading