mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 00:57:12 -05:00
Align env templates with shared secret inventory
This commit is contained in:
@@ -324,7 +324,7 @@ async def check_huggingface_status():
|
||||
|
||||
async def check_digitalocean_status():
|
||||
"""Check DigitalOcean API status"""
|
||||
do_token = os.getenv("DIGITALOCEAN_TOKEN")
|
||||
do_token = os.getenv("DIGITAL_OCEAN_API_KEY") or os.getenv("DIGITALOCEAN_TOKEN")
|
||||
if not do_token:
|
||||
return {
|
||||
"connected": False,
|
||||
|
||||
@@ -42,8 +42,11 @@ async def get_dashboard_overview(
|
||||
"""
|
||||
|
||||
# Check which services are configured
|
||||
digital_ocean_token = os.getenv("DIGITAL_OCEAN_API_KEY") or os.getenv(
|
||||
"DIGITALOCEAN_TOKEN"
|
||||
)
|
||||
services_config = {
|
||||
"digitalocean": bool(os.getenv("DIGITALOCEAN_TOKEN")),
|
||||
"digitalocean": bool(digital_ocean_token),
|
||||
"github": bool(os.getenv("GITHUB_TOKEN")),
|
||||
"huggingface": bool(os.getenv("HUGGINGFACE_TOKEN")),
|
||||
"openai": bool(os.getenv("OPENAI_API_KEY")),
|
||||
@@ -282,7 +285,7 @@ async def list_all_services(
|
||||
"description": "Cloud infrastructure management",
|
||||
"category": "infrastructure",
|
||||
"icon": "🌊",
|
||||
"configured": bool(os.getenv("DIGITALOCEAN_TOKEN"))
|
||||
"configured": bool(digital_ocean_token)
|
||||
},
|
||||
{
|
||||
"id": "github",
|
||||
|
||||
@@ -24,7 +24,15 @@ router = APIRouter(prefix="/api/digitalocean", tags=["digitalocean"])
|
||||
|
||||
# DigitalOcean API configuration
|
||||
DO_API_URL = "https://api.digitalocean.com/v2"
|
||||
DO_TOKEN = os.getenv("DIGITALOCEAN_TOKEN", "")
|
||||
|
||||
|
||||
def get_digital_ocean_token() -> str:
|
||||
"""Return the configured DigitalOcean API key, preferring the canonical name."""
|
||||
|
||||
return os.getenv("DIGITAL_OCEAN_API_KEY") or os.getenv("DIGITALOCEAN_TOKEN", "")
|
||||
|
||||
|
||||
DO_TOKEN = get_digital_ocean_token()
|
||||
|
||||
|
||||
class DropletCreate(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user