feat: Introduce bot-digitador service for automated data entry in Integración Total. Add CLI and GUI interfaces for CSV processing, implement auto-start functionality on Windows, and enhance README with setup instructions and usage details. Include necessary configurations in docker-compose for service integration.

This commit is contained in:
erik
2026-08-09 21:26:56 -05:00
parent a3b4c7fc47
commit e9b766281a
74 changed files with 11177 additions and 115 deletions
@@ -0,0 +1,20 @@
from __future__ import annotations
import os
from typing import Optional
from fastapi import Header, HTTPException
def get_api_token() -> str:
return os.getenv("BOT_API_TOKEN", "dev-token-change-me")
def require_bearer(authorization: Optional[str] = Header(default=None)) -> str:
expected = get_api_token()
if not authorization or not authorization.lower().startswith("bearer "):
raise HTTPException(status_code=401, detail="Authorization Bearer requerido")
token = authorization.split(" ", 1)[1].strip()
if token != expected:
raise HTTPException(status_code=401, detail="Token inválido")
return token