diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f5bd2df --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b57d7ac --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/unifi-guest-portal.iml b/.idea/unifi-guest-portal.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/unifi-guest-portal.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..8306744 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/main.py b/app/main.py index 660f2d8..2bc53c9 100644 --- a/app/main.py +++ b/app/main.py @@ -10,10 +10,13 @@ from app.auth import get_authorization_url, exchange_code_for_token, get_userinf from app.config import load_config from app.unifi import authorize_guest +from fastapi.staticfiles import StaticFiles + logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) app = FastAPI() +app.mount("/static", StaticFiles(directory="app/static"), name="static") templates = Jinja2Templates(directory="app/templates") config = load_config() diff --git a/requirements.txt b/requirements.txt index 0a8fc44..8a64b3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ python-multipart>=0.0.9 jinja2>=3.1.3 pyyaml>=6.0.1 unifi-utils-python>=1.0.0 +aiofiles>=23.0.0