Support unmanaged secrets
This commit is contained in:
@ -5,7 +5,6 @@ import logging
|
||||
from typing import Annotated
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, Security, status
|
||||
|
||||
from sshecret.backend.models import Secret
|
||||
from sshecret_admin.core.dependencies import AdminDependencies
|
||||
from sshecret_admin.services import AdminBackend
|
||||
from sshecret_admin.services.models import (
|
||||
@ -13,6 +12,7 @@ from sshecret_admin.services.models import (
|
||||
ClientSecretGroupList,
|
||||
SecretCreate,
|
||||
SecretGroupCreate,
|
||||
SecretListView,
|
||||
SecretUpdate,
|
||||
SecretView,
|
||||
)
|
||||
@ -27,7 +27,7 @@ def create_router(dependencies: AdminDependencies) -> APIRouter:
|
||||
@app.get("/secrets/")
|
||||
async def get_secret_names(
|
||||
admin: Annotated[AdminBackend, Depends(dependencies.get_admin_backend)],
|
||||
) -> list[Secret]:
|
||||
) -> list[SecretListView]:
|
||||
"""Get Secret Names."""
|
||||
return await admin.get_secrets()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user