feat: Introduce initial web frontend and backend services, and generalize directory configuration in docker-compose.
This commit is contained in:
@@ -59,6 +59,7 @@ class VaultInfo(BaseModel):
|
||||
name: str = Field(description="Display name of the vault")
|
||||
file_count: int = Field(description="Number of indexed files")
|
||||
tag_count: int = Field(description="Number of unique tags")
|
||||
type: str = Field(default="VAULT", description="Type of the vault mapping (VAULT or DIR)")
|
||||
|
||||
|
||||
class BrowseItem(BaseModel):
|
||||
@@ -603,10 +604,12 @@ async def api_vaults(current_user=Depends(require_auth)):
|
||||
result = []
|
||||
for name, data in index.items():
|
||||
if "*" in user_vaults or name in user_vaults:
|
||||
v_type = vault_config.get(name, {}).get("type", "VAULT")
|
||||
result.append({
|
||||
"name": name,
|
||||
"file_count": len(data["files"]),
|
||||
"tag_count": len(data["tags"]),
|
||||
"type": v_type,
|
||||
})
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user