diff --git a/app/api/oauth2.py b/app/api/oauth2.py index a04f53d..b3264d6 100644 --- a/app/api/oauth2.py +++ b/app/api/oauth2.py @@ -9,7 +9,7 @@ from app.oauth2 import CLIENT_ID, CLIENT_SECRET, TOKEN_URL -routes = APIRouter() +router = APIRouter() # Modelo de resposta para o token @@ -18,7 +18,7 @@ class Token(BaseModel): token_type: str # Rota de login para obter o token de acesso -@routes.post("/login", response_model=Token) +@router.post("/login", response_model=Token) async def login(form_data: OAuth2PasswordRequestForm = Depends()): # Dados para a requisição ao Keycloak payload = { diff --git a/app/router.py b/app/router.py index 773a6c8..9fffc9e 100644 --- a/app/router.py +++ b/app/router.py @@ -5,7 +5,7 @@ def created_routes(app): app.include_router(task.router, prefix="/api/task", tags=["Task Google Earth Engine"]) app.include_router(result.router, prefix="/api/result", tags=["Result Google Earth Engine"]) - app.include_router(tvi.routes, prefix="/api/tvi", tags=["TVI - Temporal Visual Inspection"]) - app.include_router(oauth2.routes, prefix="/api/auth", tags=["Authentication"]) + app.include_router(tvi.router, prefix="/api/tvi", tags=["TVI - Temporal Visual Inspection"]) + app.include_router(oauth2.router, prefix="/api/auth", tags=["Authentication"]) return app diff --git a/docker-compose.yml b/docker-compose.yml index eaf9b6d..d07b8e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,8 @@ services: - "8086:8080" volumes: - .:/home/suporte + - ./volumes/gee.json:/var/sec/gee.json + - ./volumes/logs:/logs networks: - web_lapig