@APP.post("/verify_initial_value")
async def verify_initial_value(
_nc: typing.Annotated[NextcloudApp, Depends(nc_app)], # <---- this is no needed when using new Global Middleware
input1: Button1Format,
):
print("Old value: ", input1.initial_value)
return responses.JSONResponse(content={"initial_value": str(random.randint(0, 100))}, status_code=200)
Limitations:
Talk bots endpoints using another Auth type, and they should be added to disable_for parameter of AppAPIAuthMiddleware.
For some applications it will be useful to simply set global authentication to all endpoints and not write in each endpoint:
New:
Old:
Limitations:
Talk bots
endpoints using another Auth type, and they should be added todisable_for
parameter ofAppAPIAuthMiddleware
.