Skip to content

Commit

Permalink
Backend: added storage type to catalog info returned by catalogs endp…
Browse files Browse the repository at this point in the history
…oint
  • Loading branch information
sebastian-echeverria committed Sep 19, 2024
1 parent 9cc1a17 commit 790e48f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mlte/backend/api/endpoints/catalog_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ def list_catalogs(
catalog_stores.sessions
try:
return [
CatalogReply(id=catalog_id, read_only=catalog.read_only)
CatalogReply(
id=catalog_id,
read_only=catalog.read_only,
type=catalog.get_uri().type.value,
)
for catalog_id, catalog in catalog_stores.sessions.items()
]
except Exception as e:
Expand Down
3 changes: 3 additions & 0 deletions mlte/backend/api/models/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ class CatalogReply(BaseModel):

read_only: bool
"""Whether the catalog is read only or not."""

type: str
"""Type of catalog."""

0 comments on commit 790e48f

Please sign in to comment.