diff options
Diffstat (limited to 'src/routers/scanner.py')
-rw-r--r-- | src/routers/scanner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/routers/scanner.py b/src/routers/scanner.py new file mode 100644 index 0000000..956153b --- /dev/null +++ b/src/routers/scanner.py @@ -0,0 +1,16 @@ +from fastapi import APIRouter, Depends, Request +from fastapi.responses import JSONResponse +from fastapi_jwt_auth import AuthJWT + +router = APIRouter() + + +@router.get('/callhome') +async def callhome(data: Request, Authorize: AuthJWT = Depends()): + Authorize.jwt_required() + + json_data = await data.json() + + if 'uuid' not in json_data: + return JSONResponse(content={"status": "error", + "message": "UUID missing"}) |