This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 2080aa5e095ceea714391ef7309c71f5c3f6bb4f Author: Daniel Gruno <[email protected]> AuthorDate: Mon Mar 29 15:31:12 2021 +0200 Fix response type --- server/endpoints/mgmt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/endpoints/mgmt.py b/server/endpoints/mgmt.py index f81394a..d5ecbc1 100644 --- a/server/endpoints/mgmt.py +++ b/server/endpoints/mgmt.py @@ -28,7 +28,7 @@ import time async def process( server: plugins.server.BaseServer, session: plugins.session.SessionObject, indata: dict, -) -> typing.Optional[dict]: +) -> typing.Union[dict, aiohttp.web.Response]: action = indata.get("action") docs = indata.get("documents", []) doc = indata.get("document") @@ -62,6 +62,7 @@ async def process( ) delcount += 1 return aiohttp.web.Response(headers={}, status=200, text=f"Removed {delcount} emails from archives.") + return aiohttp.web.Response(headers={}, status=404, text=f"Unknown mgmt command requested") def register(server: plugins.server.BaseServer):
