diff --git a/5/web/api.py b/5/web/api.py index 0496bcd..46a0565 100644 --- a/5/web/api.py +++ b/5/web/api.py @@ -24,6 +24,7 @@ def daj_dane(plik): app = FastAPI() + origins = ["*"] app.add_middleware( @@ -34,6 +35,7 @@ app.add_middleware( allow_headers=["*"], ) + @app.post('/invoice') async def root(file: UploadFile): return daj_dane(file.file.read())