|
3 | 3 | from sqlalchemy.orm import sessionmaker |
4 | 4 | from sqlalchemy import create_engine |
5 | 5 | from starlette.middleware.wsgi import WSGIMiddleware |
6 | | -from typing import List |
7 | | -from opencdms.models.climsoft.v4_1_1_core import Station |
8 | 6 | from climsoft_api.main import get_app as get_climsoft_app |
9 | 7 | from tempestas_api.wsgi import application as surface_application |
10 | 8 | from mch_api.api_mch import app as mch_api_application |
11 | | -from fastapi import FastAPI, Depends, Request |
| 9 | +from fastapi import FastAPI, Request |
12 | 10 | from sqlalchemy.orm.session import Session |
13 | 11 | from passlib.hash import django_pbkdf2_sha256 as handler |
14 | 12 | from src.opencdms_api.middleware import AuthMiddleWare, ClimsoftRBACMiddleware |
15 | | -from src.opencdms_api.schema import StationSchema |
16 | | -from src.opencdms_api.deps import get_session |
17 | 13 | from src.opencdms_api.db import SessionLocal |
18 | 14 | from src.opencdms_api import models |
19 | 15 | from src.opencdms_api.router import router |
@@ -41,13 +37,21 @@ def get_app(): |
41 | 37 | ] |
42 | 38 | ) |
43 | 39 | climsoft_app = get_climsoft_app() |
| 40 | + # if settings.SURFACE_API_ENABLED is True: |
| 41 | + # app.mount("/surface", AuthMiddleWare(WSGIMiddleware(surface_application))) |
| 42 | + # if settings.MCH_API_ENABLED is True: |
| 43 | + # app.mount("/mch", AuthMiddleWare(WSGIMiddleware(mch_api_application))) |
| 44 | + # if settings.CLIMSOFT_API_ENABLED is True: |
| 45 | + # app.mount("/climsoft", ClimsoftRBACMiddleware(climsoft_app)) |
| 46 | + # app.mount("/pygeoapi", AuthMiddleWare(WSGIMiddleware(pygeoapi_app))) |
| 47 | + # |
44 | 48 | if settings.SURFACE_API_ENABLED is True: |
45 | | - app.mount("/surface", AuthMiddleWare(WSGIMiddleware(surface_application))) |
| 49 | + app.mount("/surface", WSGIMiddleware(surface_application)) |
46 | 50 | if settings.MCH_API_ENABLED is True: |
47 | | - app.mount("/mch", AuthMiddleWare(WSGIMiddleware(mch_api_application))) |
| 51 | + app.mount("/mch", WSGIMiddleware(mch_api_application)) |
48 | 52 | if settings.CLIMSOFT_API_ENABLED is True: |
49 | | - app.mount("/climsoft", ClimsoftRBACMiddleware(climsoft_app)) |
50 | | - app.mount("/pygeoapi", AuthMiddleWare(WSGIMiddleware(pygeoapi_app))) |
| 53 | + app.mount("/climsoft", climsoft_app) |
| 54 | + app.mount("/pygeoapi", WSGIMiddleware(pygeoapi_app)) |
51 | 55 |
|
52 | 56 | app.include_router(router) |
53 | 57 |
|
|
0 commit comments